aftersyntax.vim


Ⅰ. 插件描述

Allows a single language (filetype) to have multiple .vim/after/syntax/ files

Ⅱ. 基本信息

创建日期:  2004-07-02
使用用户:  1
Github星:  3
插件作者:  Charles Campbell

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Currently one may have a single syntax file per filetype in the .vim/after/syntax directory.  Such files are loaded after the main syntax handling file, and are used to provide additional customized syntax highlighting.  But, what if you want two or more such files for some filetype?  <aftersyntax.vim> solves just that problem...

For example, consider the C language and Andreechtchev Eugeni's opengl.vim extension for recognizing OpenGL functions and constants (vimscript#752) plus my blockhl.vim (vimscript#104) for highlighting leading tabs based on {} depth:

Example:
1. cd .vim/after/syntax
2. mkdir c
3. mv (wherever)/aftersyntax.vim c.vim
4. mv opengl.vim  c
5. mv blockhl.vim c

Every time a C file is opened, both opengl.vim and blockhl.vim are sourced to provide their extra highlighting.

添加新评论