-
Compile
Vimfrom source for Python3 support:$ git clone https://github.com/vim/vim $ cd vim $ ./configure \ --with-features=huge \ --enable-python3interp \ --with-python3-config-dir=/usr/lib/python3.11/config-3.11-x86_64-linux-gnu/ $ make $ sudo make installTo see all of the options available for configuring the binary:
$ ./configure --help -
Install the packages needed to install all completers:
$ sudo apt-get install build-essential cmake vim-nox python3-dev -yThe official docs recommend the following command to get all runtimes:
$ sudo apt-get install mono-complete golang nodejs openjdk-17-jdk openjdk-17-jre npmSince I only want to get autocompletion for Go, I am not using the package manager to install it, since I want the latest. This is a manual step that I’ve already done.
-
Use
vim-plugto download and install theYouCompleteMepackage. Add the following line to the appropriate Vim config file (usually.vimrc):Plug 'ycm-core/YouCompleteMe'Then, still in the vim configuration file, download the plugin using the
edcommand::PlugInstall -
Install the Go completer:
$ cd ~/.vim/plugged/YouCompleteMe/ $ python3 install.py --go-completerTo install all completers:
$ python3 install.py --all
That’s it!