vim-maven-syntax


Ⅰ. 插件描述

Apache Maven syntax highlighting plugin for Vim

Ⅱ. 基本信息

创建日期:  2016-02-03
使用用户:  4
Github星:  2
插件作者:  Nikyle Nguyen

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Maven Syntax Plugin for Vim

Screenshot (theme: PaperColor)
pom.xml

This plugin provides Apache Maven syntax highlighting on top of XML.

Installation

Copy syntax and ftdetect folders into your ~/.vim/ (or vimfiles/ on Windows)

Or simply use a plugin manager like Vundle (recommended for easy :PluginUpdate):

Plugin 'NLKNguyen/vim-maven-syntax'

Usage

Manually: :set filetype=xml.maven

Automatically: pom.xml file is detected to automatically set the filetype as above.

Contribution

The syntax/maven.vim file is auto generated by a small Node.js script (generate-syntax-file.js) based on the syntax mapping rules declared in a YAML config file (syntax_mapping.yml)

Adding or changing the list of Maven tag names can be done simply by modifying the YAML file then rerunning the Node.js script to generate a new syntax file.

Build Instruction

Install dependencies with Node.js Package Manager:

$ npm install

After modifying the YAML file, run this to generate a new syntax file:

$ node generate-syntax-file.js

More information

Story behind the project: Maven Syntax Highlighting Plugin for Vim

Suggestions/Wishes/Questions/Comments are welcome via Github issues or via the blog above.

License MIT

Copyright 2016 Nguyen Nguyen

添加新评论