天天看點

VSCode 快捷鍵(整理) VScode快捷鍵(最全)

VSCode 快捷鍵整理

1,搜尋

  • Ctrl + F:查找
  • Ctrl + H:替換

2,行操作

  • 剪切一行:Ctrl+X
  • 複制一行:Ctrl+C
  • 删除一行:Ctrl+Shilft+K
  • Alt+ ↑ / ↓:向上/向下移動行 Move line up/down
  • Shift+Alt + ↓ / ↑:向上/向下複制行 Copy line up/down

3,導航

  • F12
  • Alt + ←/→  :傳回/前進 Go back / forward

轉載:VScode快捷鍵(最全)

原著作者:星朝

按 Press 功能 Function
Ctrl + Shift + P,F1 顯示指令面闆 Show Command Palette
Ctrl + P 快速打開 Quick Open
Ctrl + Shift + N 新視窗/執行個體 New window/instance
Ctrl + Shift + W 關閉視窗/執行個體 Close window/instance

基礎編輯 Basic editing

Ctrl+X 剪切行(空標明) Cut line (empty selection)
Ctrl+C 複制行(空標明)Copy line (empty selection)
Alt+ ↑ / ↓ 向上/向下移動行 Move line up/down
Shift+Alt + ↓ / ↑ 向上/向下複制行 Copy line up/down
Ctrl+Shift+K 删除行 Delete line
Ctrl+Enter 在下面插入行 Insert line below
Ctrl+Shift+Enter 在上面插入行 Insert line above
Ctrl+Shift+\ 跳到比對的括号 Jump to matching bracket
Ctrl+] / [ 縮進/縮進行 Indent/outdent line
Home 轉到行首 Go to beginning of line
End 轉到行尾 Go to end of line
Ctrl+Home 轉到檔案開頭 Go to beginning of file
Ctrl+End 轉到檔案末尾 Go to end of file
Ctrl+↑ / ↓ 向上/向下滾動行 Scroll line up/down
Alt+PgUp / PgDown 向上/向下滾動頁面 Scroll page up/down
Ctrl+Shift+[ 折疊(折疊)區域 Fold (collapse) region
Ctrl+Shift+] 展開(未折疊)區域 Unfold (uncollapse) region
Ctrl+K Ctrl+[ 折疊(未折疊)所有子區域 Fold (collapse) all subregions
Ctrl+K Ctrl+] 展開(未折疊)所有子區域 Unfold (uncollapse) all subregions
Ctrl+K Ctrl+0 折疊(折疊)所有區域 Fold (collapse) all regions
Ctrl+K Ctrl+J 展開(未折疊)所有區域 Unfold (uncollapse) all regions
Ctrl+K Ctrl+C 添加行注釋 Add line comment
Ctrl+K Ctrl+U 删除行注釋 Remove line comment
Ctrl+/ 切換行注釋 Toggle line comment
Shift+Alt+A 切換塊注釋 Toggle block comment
Alt+Z 切換換行 Toggle word wrap

導航 Navigation

Ctrl + T 顯示所有符号 Show all Symbols
Ctrl + G 轉到行... Go to Line...
轉到檔案... Go to File...
Ctrl + Shift + O 轉到符号... Go to Symbol...
Ctrl + Shift + M 顯示問題面闆 Show Problems panel
F8 轉到下一個錯誤或警告 Go to next error or warning
Shift + F8 轉到上一個錯誤或警告 Go to previous error or warning
Ctrl + Shift + Tab 導航編輯器組曆史記錄 Navigate editor group history
Alt + ←/→ 傳回/前進 Go back / forward
Ctrl + M 切換頁籤移動焦點 Toggle Tab moves focus

搜尋和替換 Search and replace

Ctrl + F 查找 Find
Ctrl + H 替換 Replace
F3 / Shift + F3 查找下一個/上一個 Find next/previous
Alt + Enter 選擇查找比對的所有出現 Select all occurences of Find match
Ctrl + D 将選擇添加到下一個查找比對 Add selection to next Find match
Ctrl + K Ctrl + D 将最後一個選擇移至下一個查找比對項 Move last selection to next Find match
Alt + C / R / W 切換區分大小寫/正規表達式/整個詞 Toggle case-sensitive / regex / whole word

多光标和選擇 Multi-cursor and selection

Alt +單擊 插入光标 Insert cursor
Ctrl + Alt +↑/↓ 在上/下插入光标 Insert cursor above / below
Ctrl + U 撤消上一個光标操作 Undo last cursor operation
Shift + Alt + I 在標明的每一行的末尾插入光标 Insert cursor at end of each line selected
Ctrl + I 選擇目前行 Select current line
Ctrl + Shift + L 選擇目前選擇的所有出現 Select all occurrences of current selection
Ctrl + F2 選擇目前字的所有出現 Select all occurrences of current word
Shift + Alt + → 展開選擇 Expand selection
Shift + Alt + ← 縮小選擇 Shrink selection
Shift + Alt + (拖動滑鼠) 列(框)選擇 Column (box) selection
Ctrl + Shift + Alt +(箭頭鍵)
Ctrl + Shift + Alt + PgUp / PgDown 列(框)選擇頁上/下 Column (box) selection page up/down

豐富的語言編輯 Rich languages editing

Ctrl + 空格 觸發建議 Trigger suggestion
Ctrl + Shift + Space 觸發器參數提示 Trigger parameter hints
Tab Emmet 展開縮寫 Emmet expand abbreviation
Shift + Alt + F 格式化文檔 Format document
Ctrl + K Ctrl + F 格式標明區域 Format selection
轉到定義 Go to Definition
Alt + F12 Peek定義 Peek Definition
Ctrl + K F12 打開定義到邊 Open Definition to the side
Ctrl + . 快速解決 Quick Fix
Shift + F12 顯示引用 Show References
F2 重命名符号 Rename Symbol
Ctrl + Shift + . /, 替換為下一個/上一個值 Replace with next/previous value
Ctrl + K Ctrl + X 修剪尾随空格 Trim trailing whitespace
Ctrl + K M 更改檔案語言 Change file language

編輯器管理 Editor management

Ctrl+F4, Ctrl+W 關閉編輯器 Close editor
Ctrl+K F 關閉檔案夾 Close folder
Ctrl+\ 拆分編輯器 Split editor
Ctrl+ 1 / 2 / 3 聚焦到第1,第2或第3編輯器組 Focus into 1st, 2nd or 3rd editor group
Ctrl+K Ctrl+ ←/→ 聚焦到上一個/下一個編輯器組 Focus into previous/next editor group
Ctrl+Shift+PgUp / PgDown 向左/向右移動編輯器 Move editor left/right
Ctrl+K ← / → 移動活動編輯器組 Move active editor group

檔案管理 File management

Ctrl+N 新檔案 New File
Ctrl+O 打開檔案... Open File...
Ctrl+S 儲存 Save
Ctrl+Shift+S 另存為... Save As...
Ctrl+K S 全部儲存 Save All
Ctrl+F4 關閉 Close
Ctrl+K Ctrl+W 關閉所有 Close All
Ctrl+Shift+T 重新打開關閉的編輯器 Reopen closed editor
Ctrl+K 輸入保持打開 Enter Keep Open
Ctrl+Tab 打開下一個 Open next
Ctrl+Shift+Tab 打開上一個 Open previous
Ctrl+K P 複制活動檔案的路徑 Copy path of active file
Ctrl+K R 顯示資料總管中的活動檔案 Reveal active file in Explorer
Ctrl+K O 顯示新視窗/執行個體中的活動檔案 Show active file in new window/instance

顯示 Display

F11 切換全屏 Toggle full screen
Shift+Alt+1 切換編輯器布局 Toggle editor layout
Ctrl+ = / - 放大/縮小 Zoom in/out
Ctrl+B 切換側欄可見性 Toggle Sidebar visibility
Ctrl+Shift+E 顯示浏覽器/切換焦點 Show Explorer / Toggle focus
Ctrl+Shift+F 顯示搜尋 Show Search
Ctrl+Shift+G 顯示Git Show Git
Ctrl+Shift+D 顯示調試 Show Debug
Ctrl+Shift+X 顯示擴充 Show Extensions
Ctrl+Shift+H 替換檔案 Replace in files
Ctrl+Shift+J 切換搜尋詳細資訊 Toggle Search details
Ctrl+Shift+C 打開新指令提示符/終端 Open new command prompt/terminal
Ctrl+Shift+U 顯示輸出面闆 Show Output panel
Ctrl+Shift+V 切換Markdown預覽 Toggle Markdown preview
Ctrl+K V 從旁邊打開Markdown預覽 Open Markdown preview to the side

調試 Debug

F9 切換斷點 Toggle breakpoint
F5 開始/繼續 Start/Continue
Shift+F5 停止 Stop
F11 / Shift+F11 下一步/上一步 Step into/out
F10 跳過 Step over
Ctrl+K Ctrl+I 顯示懸停 Show hover

內建終端 Integrated terminal

Ctrl+` 顯示內建終端 Show integrated terminal
Ctrl+Shift+` 建立新終端 Create new terminal
複制標明 Copy selection
粘貼到活動端子 Paste into active terminal
向上/向下滾動 Scroll up/down
Shift+PgUp / PgDown
Ctrl+Home / End 滾動到頂部/底部 Scroll to top/bottom

參考文檔:

VScode快捷鍵(最全)

作者

:悅光陰

出處

:http://www.cnblogs.com/ljhdo/

本文版權歸作者和部落格園所有,歡迎轉載,但未經作者同意,必須保留此段聲明,且在文章頁面醒目位置顯示原文連接配接,否則保留追究法律責任的權利。

繼續閱讀