In this tutorial, I will show you how to install jedi-vim plugin so that you will get Python autocompletion in Vim. It would require you to first install the Pathogen package manager and then install jedi-vim.
Install Pathogen
mkdir -p ~/.vim/autoload ~/.vim/bundle curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
Configure ~/.vimrc
Add the following lines in ~/.vimrc
.
execute pathogen#infect() syntax on filetype plugin indent on
Install Jedi
cd ~/.vim/bundle/ git clone --recursive https://github.com/davidhalter/jedi-vim.git
Test autocompletion in Vim
Run vim test.py
and then press i to switch to insert mode.
And, type in the code like below to see Python autocompletion in action.