Ⅰ. 插件描述
Syntax and indent plugin for React jsx.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'chemzqm/vim-jsx-improve'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'chemzqm/vim-jsx-improve'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'chemzqm/vim-jsx-improve'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/chemzqm/vim-jsx-improve
Ⅳ. 文档说明
Makes your javascript files support React jsx correctly.
Javascript syntax from pangloss/vim-javascript
Jsx highlight and indent code changed from MaxMEllon/vim-jsx-pretty
- Fixed syntax highlighting and indentation for React jsx files.
- Works well with xml.vim
This plugin have no dependency, all the code you need for jsx and javascript is
included.
Note: you need to disable vim-javascript plugin if have installed, I have to
change some highlight group to make it works with jsx.
Installation
Use pathogen or vundle is recommended. Vundle:
Plugin 'chemzqm/vim-jsx-improve'
Quick jump to function braces
You can use [[ ]] [] ][ to quick jump to { } position of functions, set g:jsx_improve_motion_disable to 1 to disable it.
New Syntax group
this is a new syntax group .if you want highlight it ,your colorscheme should add jsxEndComponentName color.
| name | place |
|---|---|
| jsxEndComponentName | </Capitals>__~~~~~~~~_ |
GIF

The colorscheme is gruvbox
The keystroke visualizer is keycastr
Feed back welcome
Feel free to open a ticket if your have problem with this plugin.