This repository hosts my Vim configuration. All the code here should be compatible with Vim 8.1+ and Neovim 0.4+.
The vimrc and the scripts in ftplugin and after provide options,
autocommands, variables, and command definitions. The files in autoload
define some auxiliary functions used to implement custom commands.
Vim or Neovim:
- Vim 8.1+ with
+jobs,+python3,+timers,+textprop, or - Neovim 0.5+ with python (
pip install neovim).
External dependencies (example packages for Arch Linux):
sudo pacman -S \
bandit \
clang \
fd \
flake8 \
gdb \
nodejs \
proselint \
python-pycodestyle \
python-pylint \
python-pynvim \
python-rope \
qt6-languageserver \
r \
ripgrep \
rust-analyzer \
texlive-most \
vint \
xclip \
yarn \
yay -S \
bibclean \
cmake-lint \
gitlint \
haskell-ide-engine \
ruby-mdl \
shellcheck-static \
On Windows/WSL, having win32yank.exe in the Windows PATH makes clipboard support work out of the box in neovim.
Copyq can be used as a clipboard provider with the following configuration:
let g:clipboard = {
\ 'name': 'copyq',
\ 'copy': {
\ '+': ['bash', '-c', 'copyq add - && copyq select 0'],
\ },
\ 'paste': {
\ '+': ['copyq', 'clipboard'],
\ '*': ['copyq', 'selection'],
\ },
\ 'cache_enabled': 1,
\ }Plugins are handled as submodules. After cloning, initialise them with
git submodule update --init --recursive- The configuration is tested on terminal Vim/Neovim on Linux. I have no idea
whether this works on Windows, MacOS, or on GUI applications like
gvim. - Plugins are handled as git submodules.
- The runtime path for plugins is handled with pathogen. I am aware of Vim 8.0+ built-in package manager, but pathogen has some handy features that I commonly use, hence I am sticking to it.
- Language server features are provided by coc.nvim. While this plugin works both with Vim and Neovim, it works significantly better with Neovim.
- The configuration for coc.nvim is defined in the
vimrcfile with theg:coc_user_config, instead of using thecoc-settings.jsonfiles, because I prefer the configuration to be scriptable. - This configuration does not include any debug integration plugin. Vim 8.0+
already provides a nice built-in gdb integration (
:help terminal-debug). While I would like a handier integration and support for other debuggers, I have not found any that satisfies my needs, so when I need anything more than:Termdebug, I usually perform debugging using external tools, outside Vim. - This configuration is for my personal use. Therefore, differently than all my other repositories on GitHub, I do not accept contributions here. The issue tracker is disabled, and pull requests will be closed and locked automatically.
- The
masterbranch contains "stable" commits, i.e. pieces of configuration that, after some battle testing, I find to be satisfactory enough. Thedevelopbranch contains "experimental" commits that I want to try more extensively in my daily usage of Vim before merging them to master. Note that the commits in thedevelopbranch that are not already merged tomastermay be amended, in case their code turns out to be faulty, since keeping a clean history is a top priority for this repository. The history of themasterbranch, on the other hand, is never rewritten. - If you are new to Vim, my advice is to not blindly clone and use this as your configuration. Many things here work for me but may not work very well for you. Many others are likely beyond your current knowledge. The best way to go is to build your own configuration from scratch. Using someone else's configuration as a starting point is likely going to be suboptimal. You are welcome to take inspiration or re-use pieces of code from here, but as a rule of thumb you should never put something in your configuration if you do not know exactly what it does and how it works.
The content of this repository is available under the MIT license.