天天看點

VSCode快捷鍵基礎編輯導航搜尋和替換

快捷鍵 功能介紹
ctrl + shift + p, F1 顯示指令面闆 show command palette
ctrl + ~ 打開指令終端
ctrl + p 快速打開 quick open
ctrl + shift + n 新視窗/執行個體 new window/instance
ctrl + shift + w 關閉視窗/執行個體 close window/instance

基礎編輯

快捷鍵 功能介紹
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

導航

快捷鍵 功能介紹
Ctrl + T 顯示所有符号 Show all Symbols
Ctrl + G 轉到行… Go to Line…
Ctrl + P 轉到檔案… 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

搜尋和替換

快捷鍵 功能介紹
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

更多指令,參考: 連結

繼續閱讀