记录常用工具快捷键,不求全,只记录高频率使用的部分,取舍得当反而有助于提升生产力。
MAC
- shift + 左右光标 选中字母
- option + 左右光标 以单词为单位跳转
- cmd + 光左右光标 首尾跳转
- ctrl + 左右光标 桌面切换
Chrome
原生(插件 vimium 无法替代或无效时)
1、在地址栏、书签栏(若显示)和页面内容之间向前切换焦点:F6
2、关闭 tab:ctrl + w (新标签页 vimium 失效)
3、光标定位到地址栏: ctrl + L(Mac 是 cmd + L)
vimium 插件
1、Open a link in the current tab (new tab):f ( F )
2、上(下,左,右)移动: j ( k, h, l )【半屏下(上): d ( u )】
3、返回顶部: gg
4、create new tab: t 【配合 5 在新 tab 中打开需要的网页】
5、Open URL, bookmark or history(in new tab): o ( O ) 【Open a bookmark (in new tab): b ( B ) 】
6、close current tab: x
7、标签页左(右)切换: shift + j ( k )
8、前进(后退):shift + h ( l )
9、搜索: / + 内容 【在搜索结果中上下检索: n ( N )】
10、refresh: r
11、Focus the first text input on the page: gi
12、Copy the current URL to the clipboard: yy
13、Restore closed tab: X
Vim, Webstorm and Sublime
sublime 很多程序猿使用,它有自己一套快捷键,需要学习使用;但快捷键 vim 不同,而我在自定义 webstorm 的快捷键时借鉴了 vim,毕竟好多 vim 快捷键有助于提升生产力,且 vim 是很多软件的内置编辑器,故,也不能放弃 vim 快捷键。那就记两套快捷键:sublime 默认快捷键和 webstorm(vim)快捷键sublime 自定义快捷键和 webstorm 统一(英文名称为自定义部分)。
目前主力编辑器为 sublime,主要是更轻量,另外,相比 IDE,使用文本编辑器可以更清楚地知道自己在干嘛。
| name | vim | webstorm | sublime |
|---|---|---|---|
| delete line | dd | ctrl + d | ctrl + d |
| 选中相同字符 | – | alt + j | alt + j |
| duplicate line or selection | – | ctrl + y | ctrl + y |
| start new line | – | ctrl + o | ctrl + o |
| 折叠代码 | – | ctrl + shift + 减号 | ctrl + shift + 减号 |
| 展开代码 | – | ctrl + shift + 等号(相当于 ctrl + 加号) | ctrl + shift + 等号 |
| 转换大写 | – | ctrl + shift + u (大小写切换) | ctrl + k + u |
| 转换小写 | – | ctrl + shift + u | ctrl + k + l |
| vim emulator | – | alt + 0 | – |
| project(default) | – | alt + 1 | – |
| terminal | – | alt + 2 | – |
| version control | – | alt + 3 | – |
| event log | – | alt + 4 | – |
| structure | – | alt + 5 | – |
| gulp | – | alt + 减号 | – |
| favorites | – | alt + 等号 | – |
| open | – | ctrl + shift + o | – |
| reindent | – | ctrl + alt + i | ctrl + alt + i |
| find in path | – | alt + shift + f | alt + shift + f |
| file | – | ctrl + alt + shift + f | – |
| show in explorer | – | ctrl + alt + shift + e | – |
| open in browser | – | ctrl + alt + shift + b | – |
| show history | – | ctrl + alt + shift + h | – |
| show history | – | ctrl + alt + shift + h | – |
配合 AutoHotKey 上下左右
AutoHotKey
RAlt::RButton |
Win10
1、打开任务栏程序: win + 数字
2、鼠标右键: App 或 document图标键
3、打开资源管理器: win + e 【配合 tab 切换目录】
4、展示所有窗口: win + tab 【配合方向键选择,alt + ( shift + ) tab 更方便?】
5、显示桌面: win + d
6、关闭程序: win + f4
7、打开消息: win + A
Hexo
1、新建文章: hexo new name
2、构建 + 发布: hexo g -d
npm
1、list npm user-installed packages: npm list -g --depth=0
命令行操作(通用,特殊单独指出)
1、新建文件夹: mkdir
2、删除文件加: rmdir 【或者 rm -r 】
3、终端切换盘符:
- cmder and win 自带命令行:直接输入盘符加冒号,如
c: - gitbash:
cd+/盘符/
参考资料:
【1】Vimium - The Hacker’s Browser
【2】Chrome 键盘快捷键
【3】Windows 的键盘快捷键
【4】npm-ls List installed packages
【5】How to list npm user-installed packages?
【6】Linux 文件与目录管理