VScode快捷鍵

VScode快捷鍵

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

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

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

搜索和替換 Search and replace

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

快捷鍵 功能 Function
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 +(箭頭鍵) 列(框)選擇 Column (box) selection
Ctrl + Shift + Alt + PgUp / PgDown 列(框)選擇頁上/下 Column (box) selection page up/down

豐富的語言編輯 Rich languages editing

快捷鍵 功能 Function
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
F12 轉到定義 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

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

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

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

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

快捷鍵 功能 Function
Ctrl+` 顯示集成終端 Show integrated terminal
Ctrl+Shift+` 創建新終端 Create new terminal
Ctrl+Shift+C 複製選定 Copy selection
Ctrl+Shift+V 粘貼到活動端子 Paste into active terminal
Ctrl+↑ / ↓ 向上/向下滾動 Scroll up/down
Shift+PgUp / PgDown 向上/向下滾動頁面 Scroll page up/down
Ctrl+Home / End 滾動到頂部/底部 Scroll to top/bottom
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章