Viktor,

I can't really explain why, but I know that c indent does handle examples
like yours just fine. I often define objects using syntax like this (pardon
the ridiculous, non real world example):

  var BASE = {
    methodName: function() {
      if (true) {
        // do something
      }
    },

    anotherMethodName: function() {
      // do something else here
    }
  };

Vim always seems to get the indenting right using the settings that I
outlined.

Regards,
Trev


Виктор Кожухаров wrote:
> 
> В пн, 2007-01-22 в 14:05 +0530, Martin DeMello написа:
> how would that work for this:
> {
>       foo: 1,
>       bar: 2
> }
> wouldn't it indent the foo and bar to the left side (since cindent would
> consider them as labels)
> -- 
> Виктор Кожухаров /Viktor Kojouharov/
> 
>  
> 

-- 
View this message in context: 
http://www.nabble.com/javascript-indenting-tf3039069.html#a8504798
Sent from the Vim - General mailing list archive at Nabble.com.

Reply via email to