JavaScript bundle for vim, this bundle provides syntax and indent plugins.
Indentation of javascript in vim is terrible, and this is the very end of it.
- very correct indentation for javascript
- support javascript indentation in html (provided by lepture)
- Install with Vundle
If you are not using vundle, you really should have a try. Edit your vimrc:
Bundle "pangloss/vim-javascript"
And install it:
:so ~/.vimrc
:BundleInstall
- Install with pathogen
If you prefer tpope's pathogen, that's ok. Just clone it:
cd ~/.vim/bundle
git clone https://github.com/pangloss/vim-javascript.git
html indentation provided by Andy Wokula is faster. But you need to make some configuration.
Suggested configuration:
let g:html_indent_inctags = "html,body,head,tbody"
let g:html_indent_script1 = "inc"
let g:html_indent_style1 = "inc"
Head over to vim.org for more information.
If you'd like to be added as a contributor the price of admission is 1 pull request. Please follow the general code style guides (read the code) and in your pull request explain the reason for the proposed change and how it is valuable.
Report a bug on GitHub Issues.