I know this has been asked before, but I'm having trouble getting JavaScript indentation to work properly in Vim.
I tried installing this plugin:
http://www.vim.org/scripts/script.php?script_id=3081
And I get this behaviour:
if (x == 1) {
alert("nice");
}
This is my vimrc:
syntax on
set background=light
colorscheme solarized
set tabstop=4
filetype plugin indent on
let g:solarized_termcolors=16
I also tried it with this plugin:
http://www.vim.org/scripts/script.php?script_id=1840
But that gives me this:
if (x == 1) {
alert("nice");
}
i.e., two tabs, where I only want it to indent by a single tab.
Anyone have any ideas what to do here?