/vim-config

My personal VIM setup

Primary LanguageVim Script

vim-config

This is my private VIM setup that I use to develop C++, D and some R and Python on Ubuntu 20.04 LTS.

Example keyboard shortcuts

  • <F1> Toggles NerdTree on the left (i.e. file explorer).
  • <F2> Gvdiffsplit (i.e. git diff inside vim).
  • <F12> Toggles Vista on the right (i.e. LSP symbol browser).
  • K Show the man page for the word under the cursor (via cppman - only for C++).
  • \gb GIT blame
  • \gc GIT commit
  • \gd GIT diff
  • \gl GIT log
  • \gp GIT push
  • \gs GIT status

Colour scheme

I use vsdark, based on the Visual Studio dark colour scheme.

Requirements

Installation

git clone https://github.com/sinisa-susnjar/vim-config.git

cd vim-config

git clone https://github.com/VundleVim/Vundle.vim.git vim/bundle/Vundle.vim

cd

if [ -f .vimrc ]; then mv .vimrc .vimrc.bak; fi
if [ -d .vim ]; then mv .vim .vim.bak; fi
if [ -d .config/nvim ]; then mv .config/nvim .config/nvim.bak; fi

ln -s $OLDPWD/vimrc ~/.vimrc
ln -s $OLDPWD/vim ~/.vim
ln -s $OLDPWD/nvim ~/.config/nvim

Install Plugins for NeoVim

:PluginInstall
:UpdateRemotePlugins

Install LSP servers

This setup uses clangd for C++, serve-d/dcd for D, python-lsp for Python, REditorSupport-languageserver for R and cmake-language-server for CMake:

sudo apt install clangd-14 clang-14
sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-14 100
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 100
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 100

git clone https://github.com/Pure-D/serve-d.git; cd serve-d; dub build -b release
git clone https://github.com/dlang-community/DCD.git; cd DCD; dub build -b release -c client; dub build -b release -c server

pip3 install 'python-lsp-server[all]'

R -e 'install.packages("languageserver")'

pip3 install cmake-language-server

Screenshots

Everybody loves screenshots :)

C++ with Vista explorer