I\'m trying to get VIM to indent Javascript with the \'=\' and related commands. When I try to auto indent the following, for example:
new function($) {
I hate to say something unhelpful like "It works for me", but it does. Even with nothing in my .vimrc and all plugins off, I get the correct indentation.
new function($) {
$.fn.setCursorPosition = function(pos) {
if ($(this).setSelectionRange) {
$(this).setSelectionRange(pos, pos);
} else if ($(this).createTextRange) {
var range = $(this).createTextRange();
range.collapse(true);
range.moveEnd('character', pos);
range.moveStart('character', pos);
range.select();
}
Have you tried loading vim with the --noplugins
switch and temporarily moving/renaming your .vimrc to see if it still doesn't work? I suspect another setting in your .vimrc or another plugin may be causing the conflict.