uniq_

setup vim autocompletion (on debian 10)

I think youcomplteme is a great autocompletion addon for vim. It's simple but effecite. It's also packaged for debian.

sudo apt install vim-addon-manager vim-youcompleteme python3-future
vam install youcompleteme
echo 'let g:ycm_global_ycm_extra_conf = "/usr/lib/ycmd/ycm_extra_conf.py"' >> ~/.vimrc
echo 'filetype on' >> ~/.vimrc

That's it. I've been using this for years and I'm quite happy with it.

Note: python3-future is required as a workaround, because debian ships a old version of youcompleteme. When you're developing python and use virtual-env, this can hide the future module form you path. This then triggers the previously mentioned bug. vim will prompt YouCompleteMe unavailable: No module named 'future' on startup. An easy mitigation is to just install that moduel to your venvs too, eg. with: python3 -m pip install future.

written by uniq on 2019-09-18