1.配置tab操作为4个空格

File->Settings->Editor->Code Style->JavaScript->Tabs and Indents

默认为4个空格,不要选中"Use tab character"

 

2.配置每行最长80个字符

File->Settings->Editor->Code Style

在Right margin中选中Wrap when typing reaches right margin    80

 

3.自动换行

File->Settings->Editor->General

在Soft Wraps中选中Use soft wraps in editor

 

4.显示空格

File->Settings->Editor->General->Appearance

选中show whitespaces

 

5.格式化代码

Code->Reformat Code

6.file type association

File->Settings->Editor->File Types 

eg:在Cascading Style Sheet 下增加

.css

*_style_*.htm

 

 6.webstorm设置为空格缩进了,但是在使用tab的文件里,还是用的tab,怎么办?

webstorm默认会使用空格缩进,只是会检测和使用文件原本的缩进方式,取消勾选即可

 7.支持es2015和jsx(JSX Harmony)

 

posted on 2016-04-27 17:02  翻页工  阅读(703)  评论(0编辑  收藏  举报