mirror of
https://github.com/jelera/vim-javascript-syntax.git
synced 2025-12-07 21:34:30 +08:00
747f267214563a9375edc29012cc5c3d7cd8033b
Enhanced JavaScript Syntax for Vim
Credits
- Zhao Yi, Claudio Fleiner, Scott Shattuck (This file is based on their hard work)
- gumnos (From the #vim IRC Channel in Freenode) (Who helped me figured out the crazy Vim Regexes)
Description
This file is a fork of this file and the stock one
This version of this file features the following text highlights:
- Parenthesis, curly and regular brackets.
- The semicolon or comma at the end of line.
- Browser, DOM and "Ajax" keywords like objects, methods, properties and others.
- Operation, comparison and logical symbols (
=,==,===,!=,etc.). - Separate highlight of the arguments. Thanks to Billychan.
Screenshots
This is the stock Javascript syntax file
Solarized Light
This is with the Enhanced Syntax file

Hybrid
This is with the Enhanced Syntax file

Installation
- Using NeoBundle (Which I recommend),
add this line to your
.vimrc
NeoBundleLazy 'jelera/vim-javascript-syntax', {'autoload':{'filetypes':['javascript']}}
- Using Vundle,
add this line to your
.vimrc
Plugin 'jelera/vim-javascript-syntax'
- Using Pathogen, run this command in your shell
git clone https://github.com/jelera/vim-javascript-syntax.git ~/.vim/bundle/vim-javascript-syntax
Suggested Companion Plugins
- Indentation, can be achieved with Javascript-Indent by Preston Koprivica. On my testing, it has proved to be the most capable and also indents HTML and JS inside HTML. The project is unmaintained for now, but you could fork it and improve upon it.
- Autocompletion by Tern for Vim
- Popular third-party libraries support like jQuery, YUI, Prototype, by javascript-libraries-syntax
Contributions
This project follows the Git-flow methodology, this will keep the master branch clean for new stable releases.
More about Git-flow at:
For new contributors
Follow this steps
- Clone this repository.
- Using the command line, run
git flow init -d. - Checkout the
developbranch. - For new features: Create a new
featurebranch using git-flow. - For bugfixes: Commit in the
developbranch. - Bump the date on the syntax file.
- When done, don't forget to push the
developbranch. - Submit a pull request.
While all contributions are always welcome, make sure your commit message follow this convention
License
The same as Vim
Languages
Vim Script
100%

