Vastly improved vim's javascript indentation.
Vim script
Switch branches/tags
Nothing to show
Pull request Compare This branch is 11 commits ahead, 816 commits behind pangloss:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

vim-javascript v0.10.0

JavaScript bundle for vim, this bundle provides syntax and indent plugins.

A Quick Note on Regexes

Vim 7.4 was released recently, and unfortunately broke how this plugin handles regexes. There was no real easy way for us to fix this unless we completely rewrote how regexes work.

Good News: There was a recent update to Vim 7.4 that fixes this issue.

Make sure you are at least using Vim 7.4, with patches 1-7.

If you are stuck on an older version of Vim 7.4 with no way to update, then simply perform the following commands to fix your current buffer:

:set regexpengine=1
:syntax enable


Install with Vundle

Add to vimrc:

Plugin "pangloss/vim-javascript"

And install it:

:so ~/.vimrc

Install with pathogen

  cd ~/.vim/bundle
  git clone


The following variables control certain syntax highlighting features. You can add them to your .vimrc to enable/disable their features.


Enables HTML/CSS syntax highlighting in your JavaScript file.

Default Value: 0


Enables JavaScript code folding.

Default Value: 1


Disables JSDoc syntax highlighting

Default Value: 0

Concealing Characters

You can customize concealing characters by defining one or more of the following variables:

let g:javascript_conceal_function   = "ƒ"
let g:javascript_conceal_null       = "ø"
let g:javascript_conceal_this       = "@"
let g:javascript_conceal_return     = "⇚"
let g:javascript_conceal_undefined  = "¿"
let g:javascript_conceal_NaN        = "ℕ"
let g:javascript_conceal_prototype  = "¶"
let g:javascript_conceal_static     = "•"
let g:javascript_conceal_super      = "Ω"


This project uses the git flow model for development. There's a handy git module for git flow. 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.

Bug report

Report a bug on GitHub Issues.