mac
|
window
|
control
|
window
|
option
|
alt
|
command
|
ctrl
|
描述
|
mac
|
window
|
文件內搜索內容
|
command + F
|
ctrl + F
|
文件內替換
|
無
|
ctrl + H
|
全文搜索內容
|
command + shift + F
|
ctrl + shift + F
|
全局搜索文件
|
command + P
|
ctrl + P
|
當前行上移/下移
|
option + ↑ / ↓
|
alt + ↑ / ↓
|
複製當前行在上方/下方
|
option+ shift + ↑ / ↓
|
alt + shift + ↑ / ↓
|
刪除當前行
|
command + x(不選中內容的時候剪切
就能刪除當前行)
|
ctrl + x
|
合併當前行
|
control + J
|
無
|
以單詞爲單位移動
|
option + ← / →
|
ctrl + ← / →
|
移到行首/行尾
|
command + ← / →
|
home / end
|
鍵盤多光標
|
option + ↑ / ↓
|
|
鼠標多光標
|
option + 鼠標左鍵
|
alt + 鼠標左鍵
|
選中一樣的所有內容
|
option + shift + L
|
alt + shift + L
|
側邊欄開關
|
command + B
|
ctrl + B
|
控制檯開關
|
command + J
|
ctrl + J
|
log -> console.log('');
switch -> switch (key) { case value:
break; default: break;}
for -> for (let index = 0; index < array.length; index++) { const element = array[index];}複製代碼
等等,很是方便。可是這些遠遠不夠的,像默認提供的 log 代碼片斷就不可以知足個人須要。這個時候自定義代碼片斷就特別重要了,而自定義代碼片斷是很是簡單的。像控制補全時候光標所在的位置、多光標同時修改內容、tab 鍵以後的下個位置是很是常見的操做,看我三言倆語帶你掌握
1. command + p(ctrl + p) 打開命令菜單css
div.parent>div.childern-first+div.children-two>ul>li*$4複製代碼
p10 -> padding: 10px;
pl10 -> padding-left: 10px; 其餘三個方向只要把 l 改爲 top 的 t ,
right 的 r,bottom 的 b便可
m10 ->margin:10px;
ml10 -> margin-left: 10px;
t10 -> top: 10px;
f10 -> font: 10px;
fw500 ->font-weight: 500;
h10px -> height: 10px;
w10 -> width: 10px;複製代碼