sponsor Vim development Vim logo Vim Book Ad

Javascript Indentation : Indentation for Javascript

 script karma  Rating 154/72, Downloaded by 11520  Comments, bugs, improvements  Vim wiki

created by
Tye Zdrojewski
 
script type
indent
 
description
Yes, Javascript has similarities to C, but it is a more flexible syntax, with constructs that are not handled by cindent().  And they shouldn't be, since it's not really C.

This script requires the IndentAnything plugin.

Feedback is welcome.
 
install details
Place in ~/.vim/indent.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
javascript.vim 1.1.3 2009-12-02 7.0 Tye Zdrojewski Fixed silly syntax error.  Shame on me...
javascript.vim 1.1.2 2009-11-29 7.0 Tye Zdrojewski Added support for brackets ('[...]')
javascript.vim 1.1.1 2007-11-01 7.0 Tye Zdrojewski Added copywrite / Apache2 license
javascript.vim 1.1 2007-03-28 7.0 Tye Zdrojewski Fixed issue with extra indentation in switch statements.
javascript.vim 1.0 2007-03-27 7.0 Tye Zdrojewski Initial upload
ip used for rating: 3.235.42.157

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github