Minimal init.vim for C/C++ development (manual for Debian/Ubuntu-based distributions)
- Download & save init.vim (
~/.config/nvim/init.vim) - Download Plug for NVIM: https://github.com/junegunn/vim-plug#unix-1
Install xclip/xfce4-clipman for the system clipboard supportInstalled by default in Xubuntu Desktop.- Install luajit
- Install clangd (and clang if needed):
sudo apt-get install clangd - Install nodejs and npm (required for Command-T)
- Download wombat256 colorscheme from https://www.vim.org/scripts/script.php?script_id=2465 and copy the scheme file to
~/.config/nvim/colors - Install fonts-powerline
- Launch nvim and do
:PlugInstall - Install coc-clangd:
:CocInstall coc-clangd - Build Command-T LUA library:
cd ~/.local/share/nvim/plugged/command-t/lua/wincent/commandt/lib&& make - Install bear:
sudo apt-get install bear(or compile from the sources: https://github.com/rizsotto/Bear) - Optional - Open any c/c++ file and launch coc-clangd install in case clangd is not found in $PATH: run
:CocInstall coc-clangd - To generate compile_commands.json for your project launch
bear -- $your_make_command(likebear -- make -j8) - Enjoy!