Wednesday, November 24, 2010

JavaScript - Incorrect Indentation when writing objects.

When I am writing code and it happen to be an object, like this:

http://imagebin.us/images/6f5tnz8yu7itqovop54.png

...the indentation gets all messy every time I hit <Return> to get a
new line.

Look:

http://imagebin.us/images/h6bbya0ez561invkw2q1.png

I use expandtab, and vim is configured to use 4 spaces for tabs when
coding
javascript. However, when type init: function() {<Return> the next
indent gets
messed, and with 6 spaces. I'm using autoclose.vim, but I tried
disabling it as well.
It didn't work out.

I'm not using any javascript plugin indent or anything else besides
the ones
chipped with the installation. I run vim7.3 in an arch linux box.

Any help is welcome. Thanks in advance.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment