vscode 終端
| 快捷鍵 | 事件 |
|---|---|
| control + 反引號(鍵盤左上) | 調出終端or隱藏終端 |
| control + shift + 反引號(鍵盤左上) | 新建集成終端 |
| control + A | 回到行首 |
| option + left/right | 以單詞為單位移動 |
| command + left/right | 回到行首或行尾 |
| command + F | 搜索框 |
| command + K | 清除輸出結果 |
vscode 代碼區
| 快捷鍵 | 事件 |
|---|---|
| option + left/right | 一單詞為單位移動 |
| command + left/right | 回到行首或行尾 |
| command + top/bottom | 回到首行或者末行 |
| command + shift + \ | 在花括號{}之間移動 |
| option + shift + left/right | 選中當前單詞開頭/結尾到光標之間的所有字符 |
| command + shift + left/right | 選中當前行開頭/結尾到光標之間的所有字符 |
| command + shift + top/bottom | 選中首行/末行到光標之間的所有字符 |
| command + shift + P | 打開命令面板 |
| command + delete | 刪除當前行光標左側所有內容 |
| command + delete + fn | 刪除當前行光標右側所有內容 |
| option + delete | 刪除當前光標前的單詞 |
| option + delete + fn | 刪除當前光標后的單詞 |
| command + shift + K | 刪除當前行代碼 |
| command + X | 剪切當前行代碼 |
| command + shift + enter | 在當前行的上面開始一行 |
| option + top/bottom | 上下行代碼交換位置 |
| option + shift + top/bottom | 復制當前行或者已選中行到當前行下邊 |
| option + shift + F | 格式化代碼 |
| command + K command + F | 選中的代碼格式化 |
| control + T | 光標左右字符調換位置 |
| control + J | 兩行合並成一行 |
| command + U | 撤銷一次光標的移動 |
| option + B | .html文件在瀏覽器中打開(需要安裝open in browser插件) |
自定義快捷鍵
方法:打開命令面板(command + shift + p),搜索‘打開鍵盤快捷方式(open Keyboard Shortcuts)’,
搜索想要綁定的事件,輸入你想用的快捷鍵后,按下enter即可。(注意不要與已有快捷鍵發生沖突)
| 快捷鍵 | 事件 |
|---|---|
| command + shift + ] | 選中括號內所有內容 |
| command + shift + i | 選中行進行縮進 |
| control + u | 選中部分大寫 |
| control + l | 選中部分小寫 |
