常用的前端编程快捷键整理(WebStorm)

471 阅读2分钟
Window组合快捷键中文介绍英文介绍
基础快捷键
Ctrl+Click(鼠标左键)添加/移除光标(多个)Add/Remove Caret
Ctrl+F单页面搜索Find a string in active  editor
Ctrl+R单页面替换Replace a string in active editor with another string
Ctrl+Shift+F/G全局查找(在当前的目录下)Find a string in multiple Files
Ctrl+Shift+R全局替换(在当前的目录下)Repalce a string in multiple files with another string
Ctrl+Z撤销Undo
Ctrl+Shift+Z反撤销Redo
全局导航
Alt+1快速打开左侧项目目录Activate Project window
↑or↓光标在左侧目录,上下浏览目录Up or Down
Alt+F12快速打开下侧TerminalActivate Terminal window
Ctrl+Shift+N快速打开目标文件,也可以用来查找文件Quickly navigate to a file by name
Alt+←ro→左右切换tab页面Activate perivous tab
Ctrl(按住)+Tab切换到目标位置Switcher
Esc定位到编辑器窗口(从左侧目录、Terminal)Switch Focus To Editor
单页面内导航
F2找到下一个错误Next Highlighted Error
Ctrl+G定位到指定一行Navigate to a line (and/or column) in editor by its number
编辑操作
Ctrl+W扩大选区Extend Selection
Ctrl+Shift+W缩小选区Shrink Selection
Alt+Enter显示上下文操作Show Context Actions
Ctrl+Alt+Enter向上插入一行Start New Line Before Current
Shift+Enterhift+ Enter向下插入一行Start New Line
Ctrl+Shift+Enter完成当前语句Copmlete Current Statement
Ctrl+D复制当前行到下一行,或是复制选中的代码到下一行Duplicate Line or Selection
Ctrl+X剪贴当前行Cut to clipboard
Ctrl+Y删除当前行Delete Line
Ctrl+Alt+L格式化代码Reformat Code
Ctrl+←or→光标移动(以字符、单词形式)Move Caret to Next Word
Ctrl+Alt+B进入方法实现Go to Implementation(s)
Ctrl+/注释代码Comment with Line Comment
重构
Ctrl+Alt+N内联变量Inline the selected method or variable
Ctrl+Alt+M内联方法Turn the selected code fragment into a method
Shift+F6重命名Rename the selected symbol and correct all refereneces

更多的快捷键,可以通过webstorm里面的Settings,找到keymap,在这里面可以自定义快捷键以及查找一些快捷键的使用方法。

新人上路,如有问题,请多指教RTZ....