Vim configuration for Alan Jones. Compatible with Vim 8+ and Neovim.
This configuration requires Vim 8.0+ or Neovim 0.5+.
vim --version | head -1The system Vim on macOS is outdated. Install a modern version with Homebrew:
brew install vimOr for Neovim:
brew install neovimAfter installation, ensure Homebrew's Vim is used (should be automatic if /opt/homebrew/bin or /usr/local/bin is in your PATH):
which vim # should show /opt/homebrew/bin/vim or /usr/local/bin/vimUbuntu 20.04+ includes Vim 8 by default. Install or update with:
sudo apt update
sudo apt install vimFor the latest Vim version on older Ubuntu releases, use the PPA:
sudo add-apt-repository ppa:jonathonf/vim
sudo apt update
sudo apt install vimOr for Neovim:
sudo apt install neovimClone the repository:
git clone git@github.com:alanjones/dotvim.git ~/.vimCreate symlinks:
ln -s ~/.vim/vimrc ~/.vimrc
ln -s ~/.vim/gvimrc ~/.gvimrc # optional, for GUI VimFor Neovim, create this symlink instead:
mkdir -p ~/.config/nvim
ln -s ~/.vim/vimrc ~/.config/nvim/init.vimLaunch vim - plugins will be installed automatically on first run via vim-plug.
To manually install/update plugins:
:PlugInstall " Install plugins
:PlugUpdate " Update plugins
:PlugClean " Remove unused pluginsFor best experience, install these system tools:
- ripgrep (
rg) - Fast grep for:Rgcommand - fzf - Fuzzy finder (auto-installed by vim-plug, but system install recommended)
- A Nerd Font - For powerline symbols in airline
brew install ripgrep fzfsudo apt install ripgrep fzfLeader key: \
| Mapping | Action | Notes |
|---|---|---|
Ctrl+P |
Fuzzy file finder | fzf :Files |
\e |
Toggle file explorer | NERDTree |
\E |
Find current file in explorer | NERDTree |
\b |
Buffer list | fzf :Buffers |
\h |
Recent files history | fzf :History |
\f |
Grep in files | fzf :Rg (requires ripgrep) |
\c |
Command history | fzf :History: |
| Mapping | Action |
|---|---|
\gs |
Git status |
\gb |
Git blame |
\gd |
Git diff |
\gl |
Git log |
| Mapping | Action |
|---|---|
]e |
Next error/warning |
[e |
Previous error/warning |
\af |
Run ALEFix |
| Mapping | Action |
|---|---|
\] |
Next tab |
\[ |
Previous tab |
\t |
New tab |
| Mapping | Action |
|---|---|
\l |
Toggle line numbers |
\p |
Toggle paste mode |
- fzf.vim - Fuzzy finder
- NERDTree - File explorer
- vim-fugitive - Git integration
- vim-gitgutter - Git diff in gutter
- vim-surround - Surround text objects
- vim-commentary - Comment toggling (gc)
- ALE - Async linting and LSP
- editorconfig-vim - EditorConfig support
- vim-airline - Status line
- gruvbox - Color scheme
- rainbow - Rainbow brackets