This is simply the vimrc that I have built over time. It also contains features that I left there when I was still a beginner, such as a mapping that prevents the user from using the arrows.
NOTE: this is not really meant to be used for others; it's more of a note/backup for me, but if you happen to stumble upon it, well, that's that.
NOTE 2: you will most likely need to modify the vimrc if you do the full install which includes clang_complete. See the troubleshooting section for more information.
It also contains some personal shortcuts, such as:
- F1 -> same as escape, I keep hitting F1 instead of ESC
- F2 -> toggles paste mode on/off
- and a few other typos..
The plugins that I use:
- pathogen @ https://github.com/tpope/vim-pathogen
- delimitmate @ https://github.com/Raimondi/delimitMate
- supertab @ https://github.com/ervandew/supertab
When I need to have C++ autocompletion for a specific machine, I use:
- clang_complete @ https://github.com/Rip-Rip/clang_complete
Make sure that the following are installed: python3-dev clang If they are not installed, type the following in your terminal:
sudo apt-get install python3-dev clang
If you had not installed python3-dev before you installed vim, it'll be easier to simply remove vim and reinstall it (it's faster than recompiling vim with python support).
sudo apt-get remove vim
NOTE: There might be a couple of other programs linked to vim that are currently installed, such as vim-tiny and vim-runtime. Remove them aswell.
Type the following in the terminal for...
sudo make install
sudo make
or
sudo make full
Possible causes:
- You haven't installed clang (
sudo apt-get install clang
) - The path set in /etc/vim/vimrc isn't correct. To fix your path, find where libclang.so (or libclang.so.1 in some cases) is and replace the content for the line
let g:clang_library_path = '...'
in /etc/vim/vimrc. - It is also possible that your version of LLVM is different from mine. In that case, you'll need to modify the vimrc file's global variable
let g:clang_library_path = '...'
to match the version you have available (/usr/lib/llvm-#.#/lib/libclang.so.1
). ex: If you navigate to/usr/lib/
and you see that you have a folder calledllvm-3.4
, the correct path in the variableg:clang_library_path
will be something like/usr/lib/llvm-3.4/lib/libclang.so.1
/root/.vim
|
|__autoload
|....|__pathogen.vim
|....|__delimitMate.vim
|
|__plugin
|....|__delimitMate.vim
|....|__supertab.vim