[英]Intellij Idea javascript formatting for multi-line var
因此,我花費了大量時間試圖使intellij中的javascript代碼樣式Options能夠實現我想要的並且尚未找到解決方案。 如果我用這樣的注釋聲明了多個變量
var obj = {
a: 1,
b: 2,
c: 'three',
value1: 'abc',
// This is the comment about the. next var
value3: 'four;
然后格式化最終的代碼
var obj = {
a: 1,
b: 2,
c: 'three',
value1: 'abc',
// This is the comment about the next var
value3: 'four;
無論如何,要保留該評論縮進? 我在鏈接函數上看到類似的行為
angular.module('aModule', [])
/**
* This is a controller
*/
.controller('MyCtrl', function($scope) {
$scope = [1,2,3];
});
格式文件
angular.module('aModule', [])
/**
* This is a controller
*/
.controller('MyCtrl', function($scope) {
$scope = [1,2,3];
});
我正在使用intellij Idea13。謝謝!
Project Settings
- Code Style
- JavaScript
- Wrapping and Braces
-檢查了Comment at first column
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.