jason0x43 / vim-js-indent

Vim indenter for standalone and embedded JavaScript
65 stars 9 forks source link

comment bug and 'if' #5

Open bounceme opened 8 years ago

bounceme commented 8 years ago
if (!(0 === 80 && 0 === 'http:') &&
!(0 === 443 && 0 === 'https:')) {
  var i = 0 + (':' + port)
}

if (0) {
  // default: use aws-sign2
    console.log("value");
}

the issue with the comment has something to do with the colon,thanks

jason0x43 commented 8 years ago

D'oh, I need to work on the separation of comment vs non-comment indentation.

jason0x43 commented 8 years ago

I pushed an update that should handle this case (among others). Let me know if it breaks anything else for you.

bounceme commented 8 years ago

I'll try this out. I've been doing a lot work on https://github.com/pangloss/vim-javascript since the indent script, which is the most popular among all vim users, was really not that great. I like how clean yours is so I may switch back