Vim indenter for standalone and embedded JavaScript
Vim script JavaScript HTML
Latest commit 7a3d495 Jun 1, 2016 @ichizok ichizok committed with Fix some script errors
Permalink
Failed to load latest commit information.
indent Fix some script errors Nov 14, 2016
README.md Total rewrite of JS indenter Apr 17, 2016
test.js Update test cases Nov 14, 2016
test_script.html More testcases May 2, 2016

README.md

vim-js-indent

Vim indenter for standalone and embedded JavaScript and TypeScript.

Installation

vim-plug

  1. Add Plug 'jason0x43/vim-js-indent' to your .vimrc
  2. Restart vim
  3. Run :PlugInstall

Pathogen

Clone https://github.com/jason0x43/vim-js-indent.git into your bundles directory (~/.vim/bundle).

Configuration

js_indent_flat_switch
Boolean, default=0
Set to 1 to make `case` statements align with their containing `switch`.
js_indent_logging
Boolean, default=0
Set to 1 to enable logging comments (useful for debugging).
js_indent_typescript
Boolean, default=1
Set to 0 to disable use of the JavaScript indenter for TypeScript buffers.

License

Copyright © 2014-2016 Jason Cheatham. Distributed under the same terms as Vim itself. See :help license.