Skip to content
This repository has been archived by the owner on Oct 25, 2019. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
new indent script
  • Loading branch information
davidosomething committed Jan 25, 2016
1 parent 12f00e5 commit 10fa0c6
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion md/_posts/vim-for-javascript.md
Expand Up @@ -151,9 +151,17 @@ Some notable options in this case are:
what it finds.
- [jiangmiao/simple-javascript-indenter]
- An indent plugin with an option for alignment under functions.
- [jason0x43/vim-js-indent]
- This is a somewhat new (last updated 2014, as of this writing) indent
script that also has some TypeScript support. It is based on an
[older indent script by Tye Zdrojewski] and the default JS-in-HTML indent
logic that comes with Vim.
- The indent logic starts with normal `cindent` styles and adds special
cases for comments, JSDoc, arrays, and switch/case.

Since I use [othree/yajs.vim] for my syntax, I use [gavocanov/vim-js-indent]
for improved indenting.
for improved indenting. Your best bet with any of these is to try it out and
see if you like the indent style it provides over what Vim provides by default.

## Related syntaxes

Expand Down Expand Up @@ -444,6 +452,8 @@ loads files.
[itspriddle/vim-javascript-indent]: https://github.com/itspriddle/vim-javascript-indent
[jiangmiao/simple-javascript-indenter]: https://github.com/jiangmiao/simple-javascript-indenter
[Ryan Fabella's indent script]: http://www.vim.org/scripts/script.php?script%5Fid=1936
[jason0x43/vim-js-indent]: https://github.com/jason0x43/vim-js-indent
[older indent script by Tye Zdrojewski]: http://www.vim.org/scripts/script.php?script_id=1840
[othree/es.next.syntax.vim]: https://github.com/othree/es.next.syntax.vim
[mxw/vim-jsx]: https://github.com/mxw/vim-jsx
[actually supports any of them]: https://github.com/mxw/vim-jsx/commit/80dbab7588c615126f47e50fa4d9c329d080ff95#diff-604ad63592f45d351d97cdc9eeae21a3R28
Expand Down

0 comments on commit 10fa0c6

Please sign in to comment.