Vim Cider Vinegar
Use your favourite plugin manager like vim-plug:
Enable the plugin by adding these to your vimrc:
let g:CiderEnableNERDTree = 1 let g:CiderEnableBuffergator = 1
Plug 'scrooloose/NERDTree' Plug 'jeetsukumaran/vim-buffergator'
Additionally, the following options must be set in your vimrc (otherwise Cider Vinegar will set them for you):
let g:NERDTreeHijackNetrw = 1 let g:NERDTreeQuitOnOpen = 1 let g:buffergator_viewport_split_policy = "N"
Commands and Keymaps
The commands below open their respective buffers in the current window, replacing the buffer that was there before. Selecting a file from this list will open it in the current window. If a file is selected for split-view or if the window is closed (using
q), the window is returned to the buffer where you started.
|Command||Buffer Opened||Suggested Keymap|
Copy the following to your vimrc to use the suggested keymaps.
let g:CiderToggleNERDTree = '-' let g:CiderToggleBuffergator = '=' let g:CiderToggleQF = '<leader>q' let g:CiderToggleLL = '<leader>l'
Note that these keymaps act as toggles, so pressing
- in a Cider NERDTree window will close it, instead of the vim-vinegar behaviour of continuing up the directory tree. To turn this off, add
let g:CiderWithVinegar = 0 to your vimrc.