Enable python autocomplete in Vim without any installation
I am coding Python3 in Vim and would like to enable autocomplete.
I have to use different computers without internet access. Each computer runs Linux with Vim preinstalled.
I don't want to install anything, I just want the easiest way to enable python3 completion (even if it's not the best completion), just something that is easy to resolve from scratch on a new Linux machine.
Many thanks
source to share
Unfortunately Vim doesn't do what you want by default, you are pretty much limited by the Ctrl-P style which is better than it sounds when you get used to it.
However, I also often find myself working on machines that are not allowed internet access or have other files, and when I find myself in this situation and I use an unfamiliar language, I sometimes use a Vim dictionary for the dictionary: http: // vim .wikia.com / wiki / VimTip91
To populate this dictionary I cat / trim / filter the man pages for the language to get a variety of keywords. I put them in a dictionary of specific file types:au FileType * execute 'setlocal dict+=~/.vim/words/'.&filetype.'.txt'
Obviously, this is not the biggest solution and it is a little heavy, but it does provide a degree of "What is a function called" type.
source to share