vim-es7


Ⅰ. 插件描述

Vim JavaScript ES6 + ES7 syntax with Flow support

Ⅱ. 基本信息

创建日期:  2015-03-30
使用用户:  13
Github星:  21
插件作者:  Alex Kern

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

YAJS: Yet Another JavaScript Syntax

Yet Another JavaScript Syntax file for Vim. Key differences:

  • Use 'javascript' as group name's prefix, not 'javaScript' nor 'JavaScript'. Works great with SyntaxComplete.
  • Recognize Web API and DOM keywords. Keep increase.
  • Works perfect with javascript-libraries-syntax.vim
  • Remove old, unused syntax definitions.
  • Support ES6 new syntax, ex: arrow function =>.

For ES7 features such as async, await. Please install es.next.syntax.vim.

Differences from jelera/vim-javascript-syntax

I start a new project instead of send PR to jelera is because: jelera/vim-javascript-syntax is not so active.
And I want to do lots of changes, including ES6 and other not confirmed standard support.
Also, one of my goal is produce 100% correct syntax.
But it hurt performance, so I prefer to create a new one instead of merge back.

Installation

Use pathogen or vundle is recommended. Vundle:

Plugin 'othree/yajs.vim'

Credits

  • Jose Elera, Enhanced Javascript syntax
  • 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)

Report Issue

Please send issue report to github. Provde sample code to help me debug.

Changes

Version 1.5

  • Lots of bug Fix
  • Support semantic highlight

Version 1.4

  • Better Array Comprehesion support
  • Better Template highlight
  • AngularJS JSDoc module
  • Fix object literal syntax
  • Don't break vim-jsx

License

The same as Vim

添加新评论