如何在WebStorm 2017中禁用注释行换行

时间:2017-08-03 19:32:55

标签: webstorm

我正在使用WebStorm 2017,但我遇到了线条评论换行的烦人问题

在:

"devDependencies" : {
   "gulp"            : "latest", /* Manager */
   "gulp-babel"      : "latest", /* Minify JS (ES2015) */
   "gulp-babili"     : "latest", /* gulp-babel */
   "gulp-csso"       : "latest", /* Minify CSS */
   "gulp-htmlmin"    : "latest", /* Minify HTML */
   "gulp-rigger"     : "latest", /* Insert file to file */
   "gulp-sass"       : "latest", /* Compile SASS */
   "gulp-sourcemaps" : "latest", /* Sourcemap to JS\CSS */
   "gulp-uncss"      : "latest", /* Clear CSS */
   "gulp-util"       : "latest", /* Gulp util */
   "rimraf"          : "latest"  /* File delete */
}

后:

"devDependencies" : {
   "gulp"            : "latest", 
   /* Manager */
   "gulp-babel"      : "latest",
   /* Minify JS (ES2015) */
   "gulp-babili"     : "latest",
   /* gulp-babel */
   "gulp-csso"       : "latest",
   /* Minify CSS */
   "gulp-htmlmin"    : "latest",
   /* Minify HTML */
   "gulp-rigger"     : "latest",
   /* Insert file to file */
   "gulp-sass"       : "latest",
   /* Compile SASS */
   "gulp-sourcemaps" : "latest",
   /* Sourcemap to JS\CSS */
   "gulp-uncss"      : "latest",
   /* Clear CSS */
   "gulp-util"       : "latest",
   /* Gulp util */
   "rimraf"          : "latest" 
   /* File delete */
}

如何禁用评论的换行?对于所有格式,json,js等......

需要一些帮助。

1 个答案:

答案 0 :(得分:1)

格式化JavaScript对象文字时,注释与我保持在同一行。 对于JSON,请尝试在Settings | Editor | Code Style | JSON | Wrapping and Braces

中将对象设置为不包装