sponsor Vim development Vim logo Vim Book Ad

JavaScript Context Coloring : JavaScript plugin to highlight scope regions

 script karma  Rating 20/7, Downloaded by 4226  Comments, bugs, improvements  Vim wiki

created by
David Wilhelm
 
script type
ftplugin
 
description
This is a plugin for the Vim text editor to highlight JavaScript code
according to its scope. This was inspired by an idea by Douglas Crockford
in his presentation (http://www.youtube.com/watch?v=dkZFtimgAcM) at YUIConf 2012.
(See from around the 16 minute mark onwards.)

The GitHub repo will always have latest version:

https://github.com/bigfish/vim-js-context-coloring
 
install details
Node.js is currently required for the script to work.

Recommended Installation Method: Use Pathogen.

0. install Pathogen (https://github.com/tpope/vim-pathogen)

1. Copy the package, or clone the repo from GitHub into your 'bundle' directory:

    git clone git@github.com:bigfish/vim-js-context-coloring.git

2. install node deps (in repo dir):
    
    npm install

3. Install docs (in Vim):

    :Helptags


Or you can copy the after/ftplugin/javascript.vim file into your VIMHOME, as well as the bin/ directory.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-js-context-coloring-0.0.8.zip 0.0.8 2015-08-18 7.0 David Wilhelm support ES6, JSX.
vim-js-context-coloring-0-0-6.zip 0.0.6 2014-02-03 7.2 David Wilhelm support gVim and MacVim.
support extended color notation.
turn on 'colorize comments' by default.
vim-js-context-coloring-master.zip 0.0.5 2014-01-06 7.3 David Wilhelm - make default colors 16 color safe
- add instructions to get 256 color support working in terminal
- ensure disabling works.
vim-js-context-coloring-0-0-4.zip 0.0.4 2013-11-02 7.3 David Wilhelm Added support for 7.3, though 7.4 is recommended.

Fixed range overrun by one character at end of function expressions (via update to node lib eslevels)

Update instructions: run 'npm install --update' to update the eslevels dependency.
vim-js-context-coloring-0-0-3.zip 0.0.3 2013-10-29 7.0 David Wilhelm made more tolerant of parser errors .. will revert to default syntax highlighting if it cannot parse the code.
vim-js-context-coloring-master.zip 0.0.2 2013-10-19 7.0 David Wilhelm added comment color config options
vim-js-context-coloring-master.zip 0.0.1 2013-10-18 7.0 David Wilhelm Initial upload
ip used for rating: 216.73.216.46

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github