This plugin provides gtest integration to Vim/Neovim. The plugin depends on cmake4vim what allows to use information from cmake target in order to switch between different gtest executables.
You can use VimPlug for installation:
Plug 'ilyachur/cmake4vim'
Plug 'ilyachur/gtest-vim'
The current version of the plugin supports next commands:
:GTest
runs gtest executable. Information from CMake target is used for cmake projects, in other case the path to gtest executable should be defined byg:gtest_executable
variable.:GTest!
runs gtest executable, but ignore arguments fromg:gtest_usr_args
.:GTestRunThis
runs gtest test case under the cursor.
<Plug> mapping |
Command |
---|---|
(GTest) |
:GTest |
(GTestRunThis) |
:GTestRunThis |
Plugin supports special global variables which are allow to change behaviour of commands (you can change them in your .vimrc):
g:gtest_executable
the path to gtest executable. Default is empty, in case of using gtest with cmake project this variable isn't used.g:gtest_usr_args
allows to specify user arguments for gtest.
Variables from cmake4vim plugin
Some variables from cmake4vim work also in case of using with non-cmake project:
g:cmake_vimspector_support
g:cmake_vimspector_default_configuration
g:cmake_build_executor
g:cmake_build_executor_height
Please read cmake4vim README to get more information about these variables.
Bug reports, feedback, feature and other pull requests are appreciated. Check the Contributing Guidelines for how to create a feature request, submit a pull request or post an issue.
Ilya Churaev [email protected]
MIT