This plugin provides a few utilities for working on CMake projects from vim.
This plugin can analyze the current CMakeCache.txt
(see
lh#btw#compilation_dir()
) and report miscellaneous
information:
- Where the
CMakeCache.txt
file is thanks tolh#cmake#_where_is_cache()
- The dictionary (
:h Dict
) of variables matching a REGEX pattern withlh#cmake#get_variables(*pattern*)
- The list of project specific includes (it lists the content of all CMake
XXX_INCLUDE
variables)
It also provides a :CMake
command that takes different parameters:
:CMake where-is-cache
displays the location of the currentCMakeCache.txt
;:CMake open-cache
opens the currentCMakeCache.txt
;:CMake show pattern
displays the cached CMake variables that have a name that matches the REGEX pattern
lh-cmake provides (an extremly incomplete) dictionary of CMake keywords, variables, ... that can be used to help Vim complete in CMake files.
This plugin will best installed with Vim-Addon-Manager as it will also install dependencies (lh-vim-lib).
By the mean time, you can clone this repositoriy and lh-vim-lib and install them manually or with your prefered plugin manager.
This plugin needs the variable (bpg):BTW.compilation_dir
to be set to the
directory where ccmake
has been executed. Having this variable set and
up-to-date can be automated thanks to
BuildToolsWrapper and
local_vimrc.
More on the subject latter.