clighter8
clighter8 copied to clipboard
VIM C++ semantic syntax highlight plugin
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.