A modular vim configuration

This is my personal vim configuration that is partly inspired by SpaceVim. It is compatible to vim, gvim (8.0+) and neovim (0.2+). The configuration is split up into multiple files such that personal customization is separated from boilerplate code.

Installation

Requirements

The install script that is shipped with this configuration also checks for the following requirements:

  • python3 support for vim/gvim
  • neovim python3 module
  • aspell

Under a Debian-like Linux system you can install these by the following commands

sudo apt-get install aspell aspell-de python3-pip
pip3 install neovim

Clone & install

If you already have a vim configuration in place then you may first move your ~/.vim directory first

mv ~/.vim ~/.vim-old

Assumung that there is ~/.vim anymore, simply clone this repository into ~/.vim and invoke install.sh therein.

git clone https://git.sthu.org/repos/vimconf.git ~/.vim
~/.vim/install.sh

This install script creates backups of existing configuration files (e.g., ~/.vimrc) and then creates symlinks to configuration files in ~/.vim.

Specialization for local machines

I personally would like to have the same vim configuration on all my accounts. Still, on certain machines I would like to personalize and specialize the configuration. The following files are read if existent:

  • plugins-local.vim
  • macros-local.vim
  • keymaps-local.vim
  • init-local.vim

Example files are shipped with the repository.

This vim configuration uses the well designed and popular gruvbox colorscheme. In case you use mutt as mail client and vim for composing mails then you may find my mutt gruvbox colorscheme interesting.

Screenshots

Start screen

The start screen provided by startify. On the left the window shown by the command :PlugUpdate to update all plugins asynchronously using Plug.

Conditional plugin loading makes vim to fire up in 0.2 seconds on my machines.

Start screen and plugin updater

Programming

C and Python programming with NERDTree on the left with NERDtree git plugin and Tagbar on the right. Neomake shows an flake8 error on the cursorline at line 18 of utils/echorec.py. The tags file is automatically generated by gutentags and the current working directory of vim is automatically changed to the git root by rooter. A git diff indicated by plus, minus, and changed signs provided by signfiy. Indent detection by detectindent.

C and Python
programming

C++ programming with git blame (:Gblame) by fugitive on the left and semantic autocompletion by vim-clang:

C++ programming

A GDB session in gvim via conque-gdb. A breakpoint is set in vim, the current execution line is highlighted and variable under the vim cursor is print.

GDB debugging

Web development

On the left we see markdown with vim-liquid plugin and on the right CSS resp. SASS with scss-syntax and vim-css-color. Spell checking is enabled and the language is automatically detected via vim-DetectSpellLang.

web

LaTeX

The vimtex plugin shows a TOC on the left and integrates continuous latex builds with latexmk and an automatically updates preview in okular on the right.

latex

Manpager

Put this line in your shell configuration file (e.g., ~/.profile) in order to make vim the manpager.

export MANPAGER="view -c MANPAGER -"

manpager