如何教这样的vim缩进

时间:2011-03-31 20:44:20

标签: javascript vim indentation

var Comments = new Schema({
    title     : String
  , body      : String
  , date      : Date
});

var BlogPost = new Schema({
    author    : ObjectId
  , title     : String
  , body      : String
  , date      : Date
  , comments  : [Comments]
  , meta      : {
        votes : Number
      , favs  : Number
    }
});

我的vim现在这样缩进:

Offer = new Schema({
          'title': {type: String},
          'discount': {type: String},
});

1 个答案:

答案 0 :(得分:2)

谢谢大家,我已经从这个github repo安装了新的缩进文件: JavaScript Indent : Javascript indenter (HTML indent is included)