Vim OOP javascript indentation plugin

Posted by AllenWei | Posted in vim | Posted on 03-04-2010-05-2008

View Comments




<brast post”:http://www.allenwei.cn/vim-javascript-code-formatter-jsbeautify/ I introduced a vim javascript plugin called jsBeautify

But you’ll find when you write OO javascript, vim indent is wrong.

There also a vim indent plugin called OOP javascript indentation is want you need

Download the script put at ~/.vim/indent

Vim javascript code formatter – jsbeautify

Posted by AllenWei | Posted in vim | Posted on 03-04-2010-05-2008

View Comments

If you want to format javascript file in vim jsBeautify plugin is want you need.

you can go to http://www.vim.org/scripts/script.php?script_id=2727 download the script.

And place it into your .vim/plugin/

the default shortcut is <leader>ff

If you want to change it, open the jsBeautify plugin file, at the bottom you can find the keymap definition.

It also have a web site to format your js code http://jsbeautifier.org/

Ads Plugin created by Jake Ruston's Wordpress Plugins - Powered by and football database.