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;复制代码