vim-javascript-lib


Ⅰ. 插件描述

companion of vim-javascript, provide syntax highlight of javascript libraries

Ⅱ. 基本信息

创建日期:  2014-12-07
使用用户:  81
Github星:  12
插件作者:  Crusoe Xia

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'crusoexia/vim-javascript-lib'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'crusoexia/vim-javascript-lib'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'crusoexia/vim-javascript-lib'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/crusoexia/vim-javascript-lib

Ⅳ. 文档说明

vim-javascript-lib

This is a companion plugin of vim-javascript, which provide the keyword highlight of famous js libraries and start to support native methods. This plugin will not try to highlight every method of the libs, it only highlight most frequent used __global variables__, such as _, $, Backbone, because __sometimes the more you see the less you get__, we just care the most important stuff here.

Install

Install with Vundle

Plugin 'crusoexia/vim-javascript-lib'

Dependency

This plugin is designed to work with vim-javascript, so vim-javascript is hard dependency, you must install it to make the plugin works.

JS native highlight

  • Array methods

Libraries

Right now the list is:

  • underscore / Lo-Dash
  • jQuery / Zepto
  • Backbone
  • angular
  • Handlebars / Mustache
  • mocha
  • AMD
  • Q

HTML

This plugin will also fix the html attribute highlight issue of original vim.

Screenshots

Before:

before

After:

after

添加新评论