Ⅰ. 插件描述
VIM C++ semantic syntax highlight pluginⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'bbchung/clighter8'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'bbchung/clighter8'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'bbchung/clighter8'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/bbchung/clighter8
Ⅳ. 文档说明
# Clighter8: Vim C++ syntax highlight plugin by libclang
Intro
Clighter8 is a server-client Vim syntax highlight plugin, provides following
features:
- On-the-fly, highly customized semantic syntax highlight
- Compilation database supporting
- An awesome color scheme
Requirements
Clighter8 requires the following things:
- Vim with +job and +channel features
- libclang and compatible clang python bindings
Installation
Use a plugin manager, for example
- Vundle Install:
Bundle 'bbchung/clighter8'Usage
Clighter8 provides following commands.
ClStart
Start Clighter8, highlight the code.
ClStop
Stop Clighter8.
ClRestart
Restart Clighter8.
ClShowCursorInfo
Show cursor informations from libclang. It's useful when debugging.
ClShowCompileInfo
Show compiler args of current buffer.
ClEnableLog
Enable log, the path of log file is '/tmp/clighter8.log'.
ClDisableLog
Disable log.
ClLoadCdb (Experimental)
It will start clighter8 and open source files described in compilation
database and all referenced header files under current working folder of Vim.
Notice that it may take long time if the compilation database is big.
Compilation Database
Clighter8 supports compilation database, and it will load the compilation
database in the current working directory. It's strongly recommended to
provide a compilation database for Clighter8 to get the better result of
syntax highlight. For more information about compilation
database, please reference Compilation Database.
FAQ
Highlight feature doesn't work?
Check the Requirements and Installation, and
check if a valid libclang path is given, also, you can check
/tmp/clighter8.log. Remember to set g:clighter8_global_compile_args or provide
the compilation database to get the better highlight result.
How to set compile args?
Clighter8 sets the compile args for each file with
(g:clighter8_global_compile_args + "compilation database"). Compile args will
affect the correctness of highlight.
LICENSE
This software is licensed under the GPL v3 license.
Note: This license does not cover the files that come from the LLVM or other
third party libraries.