The YouCompleteMe plugin (YCM) provides “Intellisense-like” features within Vim. Setting it up requires several steps:
- Install the plugin using any Vim plugin manager. For example, if you use Vundle, you would add to your .vimrc:
- Plugin ‘Valloric/YouCompleteMe’
- Install development tools:
sudo apt install build-essential cmake python3-dev
- Install Ubuntu packages on which YCM depends for the programming languages you plan on using:
- For C and C++ support: sudo apt install clang-8 libclang1-8 clang-tools-8
- For C# support: sudo apt install mono-complete
- For JavaScript and TypeScript: sudo apt install nodejs npm
- For others, see the YCM documentation at https://github.com/ycm-core/YouCompleteMe
- Run the YCM install.py script with flags appropriate to the above languages:
- For C and C++:
--clang-completer
- For C#: –cs-completer
- –ts-completer
- For example, if you want support for all three of the above language groups, you would do:
cd ~/.vim/bundle/YouCompleteMe
- python3 ./install.py –clang-completer –cs-completer –ts-completer
- For C and C++: