It switches between the Test and the Implementation files
- Add
Plug 'larecg/toggleTest.nvim'
to your vimrc file. - Reload your vimrc or restart
- Run
:PlugInstall
Vundle or similar
- Add
Plugin 'larecg/toggleTest.nvim'
to your vimrc file. - Reload your vimrc or restart
- Run
:BundleInstall
- Add
NeoBundle 'larecg/toggleTest.nvim'
to your vimrc file. - Reload your vimrc or restart
- Run
:NeoUpdate
cd ~/.vim/bundle
git clone https://github.com/larecg/toggleTest.nvim.git
git clone https://github.com/larecg/toggleTest.nvim.git ~/.vim/pack/larecg/start/toggleTest.nvim
" Create custom mapping to toggle the test file
nnoremap <leader>ft :lua require("toggleTest").toggleToFile('edit')<cr>
" Create custom mapping to open a vertical split with the toggled file
nnoremap <leader>fT :lua require("toggleTest").toggleToFile('vsplit')<cr>
" Create custom mapping to open a horizontal split with the toggled file
nnoremap <leader>fS :lua require("toggleTest").toggleToFile('split')<cr>
- testFileSuffix.- Suffix used for the test files (default: "test")
- testFolderName.- Folder name used for the test files (default: "tests")
Example to keep the test file at the same level:
nnoremap <leader>ft :lua require("toggleTest").toggleToFile('edit', { testFolderName = false })<cr>