webstorm使用
博客地址(引用)
快捷键
ctrl组合键
Ctrl + G
- 向下选中单词
- 多个变量批量修改
ctrl + k
- 删除到行尾
command组合键
command + ,
- webstorm设置
command + d
- 复制当前行到下一行
- 创建当前行副本
command + delete
- 删除当前行
- 光标会移动到下一行末尾
command + L
- 跳转到指定行
command + r
- 查找替换
command + p
- 显示参数信息
command + w
- 关闭当前窗口
command + b
- 快速定位到方法
command + e
- 快速打开最近的文件
command + x
- 剪切当前行
command + +
- 展开代码块
command + -
- 折叠代码块
command + ➡️
- 移动到行尾
command + ⬅️
- 移动到行首
command + n
- 快速创建新文件
command + ~
- 多个webstorm项目窗口切换
command + option(alt)组合键
command + option + t
- 格式化代码
command + option + enter(return)
- 当前行上方插入行
command + option + /
- 多行注释
command + shift组合键
command + shift + [
- 切换窗口
command + shift + -
- 折叠所有代码块
command + shift + f
- 项目全局搜索(查找)
command + shift + F7
- 高亮选中单词
- 按esc退出高亮显示
command + shift + c
- 拷贝当前文件路径
command + shift + s
- 复制当前文件(html/js… 非文件夹)
shift组合键
shift + return(enter)
- 在任意位置换行
ctrl + shift组合键
ctrl + shift + j
- 合并行
option组合键
option + delete
- 向前删除单词
option + fn + delete
- 向后删除单词
option + ➡️
- 向右以单词为单位移动光标
option + shift组合键
option + shift + ⤴️
- 代码上下移动
其它快捷键
F2
- 高亮错误或快速定位
F5
- 复制项目(文件夹)
自定义快捷键
option + d
- open in default browser
- 在默认浏览器运行
option + r
- rename …
- 重构文件名
- f6 + shift
- 软件自身快捷键
shift + command + w
- close others
- 关闭当前项目中其它活动窗口
其他功能
设置代码片段
css
- command + , 打开webstorm设置
- 搜索 live templates
- zen css
- 添加css样式, 设置快捷键
- 如图
常用的css
- margin: 0 auto;
js
和css设置一样, 在JavaScript中修改即可
怎么破
1. webstorm不加载node_modules文件夹
- 为了提高性能, 隐藏了
- 很好破, 删除项目中.idea文件, 重新打开即可