A minimal config for Vim.
You will need the following.
- Vundle to manage plugins
- ripgrep for fzf.vim
- ctags for Tagbar (install with e.g. Homebrew)
- bat for fzf.vim (optional)
This requires a manual build if yarn
is not installed:
cd ~/.vim/bundle/coc.nvim
yarn install
Use the following config:
echo '
{
"suggest.snippetsSupport": false, // less completion clutter
"suggest.maxCompleteItemCount": 10, // smaller completion
"diagnostic.enable": false, // disable syntax error popups
"suggest.enableFloat": false, // disable docs in completion
}
' > ~/.vim/coc-settings.json
Run the following to get started.
git clone https://github.com/benthorner/vim-rc.git $HOME/.vim-rc
Then add the following to ''.vimrc''.
source $HOME/.vim-rc/vimrc
Finally, open vim and run this...
:PluginInstall
See "plugins" in vimrc for which plugins are used and why.
As well as a few general key mappings (see "mappings" in vimrc), many plugins also have additional or altered key mappings: see the relevant section for the plugin in vimrc.
Each key mapping defined in vimrc follows the rules below:
-
In the first instance, the mapping should be
<leader>
followed by a single key. -
If there are several related mappings, the "primary" mapping should follow the above rule; other mappings should be
,
followed by the "primary" mapping key, followed by another key.
The first rule ensures common mappings are convenient. The second rule allows for extension, but without reducing the available keys to use with the first rule, or creating ambiguity that slows the "primary" mapping e.g. compare <leader>f
("primary") with <leader>fg
(slows primary) vs ,fg
(primary still fast).