VS Code · Shrink selection
Selection
Windows · Linux
Shift+Alt+LeftMac
Ctrl+Cmd+Shift+Left把擴大的語法層級一層層收回;它和擴大是一對,多擴了一層也不必重新選。
- 分組
- Selection
- 同時按幾個鍵
- 3
記住命令選擇區(Ctrl/Cmd+Shift+P),其餘就不用背了——輸入功能名稱,快速鍵就列在旁邊。
按鍵名稱怎麼讀
- 用 + 連起來的鍵要一起按。Ctrl+Shift+P 是按住 Ctrl 和 Shift 再按 P。
- Mac 上 Cmd 是 ⌘,Option 是 ⌥(有些鍵盤上印作 Alt),Control 是 ⌃,Shift 是 ⇧。
- Windows 的 Ctrl 在 Mac 上大多換成 Cmd,但並非總是如此——本詞典把兩個組合分開列出。
- 開著韓文、日文或中文輸入法時,含字母鍵的快速鍵可能沒反應。切到英文輸入再試。
- 組合按下去毫無反應,通常是別的程式把它當全域快速鍵先占了。
常見問題
Q. VS Code 裡 Shrink selection 的快速鍵是什麼?
把擴大的語法層級一層層收回;它和擴大是一對,多擴了一層也不必重新選。 Windows 是 Shift+Alt+Left,Mac 是 Ctrl+Cmd+Shift+Left。
Q. Windows 和 Mac 一樣嗎?
不一樣。Windows 是 Shift+Alt+Left,Mac 是 Ctrl+Cmd+Shift+Left。
Q. 要按幾個鍵?
3 個同時按。這個組合屬於 VS Code 的 Selection。
相關快速鍵
Expand selectionShift+Alt+RightAdd a cursor with the mouseAlt+ClickAdd cursor aboveCtrl+Alt+UpAdd cursor belowCtrl+Alt+DownAdd cursor at next occurrenceCtrl+DSelect every occurrence of the selectionCtrl+Shift+LSelect every occurrence of the wordCtrl+F2Cursor at the end of every selected lineShift+Alt+I