webstorm的缩进设置(过度缩进解释)

在编写前端代码时 缩进规范一般被认为是2个空格 而非默认的4个空格

当我们通过webstorm去编写前端代码时 我们可以通过setting->Code Style->html/css/js指定的界面中去设置tab/indent/continuation indent

具体的话 我们将html/css/js操作界面中的tab/indent设置为2个空格即可 他们控制的是元素/元素内容/元素嵌套的子元素的缩进效果

而continuation indent表示的是过度缩进 他控制的是一行显示不下的内容(元素属性等等)换行显示时的缩进效果 比如js代码函数调用换行显示参数时的参数的缩进效果

并且 建议当我们需要自定义缩进效果时 将Code Style界面的Detect and use existing file indents for editing和Enable EditorConfig support取消勾选(他们会根据一些已存在的缩进文件去设置缩进效果)

相关推荐
zh_xuan1 小时前
Visual Studio 上传工程到github
ide·git·github·visual studio
无限进步_3 小时前
【C++】只出现一次的数字 II:位运算的三种解法深度解析
数据结构·c++·ide·windows·git·算法·leetcode
无限进步_5 小时前
【C++】多重继承中的虚表布局分析:D类对象为何有两个虚表?
开发语言·c++·ide·windows·git·算法·visual studio
徐先生 @_@|||6 小时前
基于Translation插件实现在pycharm本地翻译并阅读英文资料
ide·python·pycharm
银河系的一束光10 小时前
使用 IntelliJ IDEA 开发 Java 程序时 , 会遇到以下中文乱码问题 :
java·ide·intellij-idea
小宋加油啊10 小时前
Mac vscode安装PCL
ide·vscode·macos
xiaotao13111 小时前
阶段零:IDE选择 与 Jupyter Notebook / Lab 使用
ide·人工智能·python·jupyter
꯭爿꯭巎꯭12 小时前
visual studio code (vscode)下载
ide·vscode·编辑器
范什么特西12 小时前
MyEclipse8.5配置
java·ide·myeclipse
Thomas214312 小时前
skill分享 iterm2 jupyter jumpserver
ide·python·jupyter