My Vim setup for Python programming

I have been using Vim now for many years, but usually with fairly vanilla setup as I did not want to depend on fancy features if had to work remotely on older machines. Those days are now gone and I can focus my hacking on somewhat recent Linux installations and using the latest Vim versions.

vimscreenshotThis screenshot shows the output of the vim-plug command :PlugUpdate and the 24 bit color scheme tender.

Vim-plug plugin manager

On a day-to-day basis I am editing Python 98% of my time, with some bash and LaTeX in the last 2%, so the plugins I have listed below are biased towards python. A major development in my Vim usage was the vim-plug plugin manager and the corresponding plugins. My full .vimrc is listed below, but can also be found on my github page: github.com/tjansson60/dotfiles. The most important change is the the plugin manager which needs a little more explanation.

This short snippet below is pure magic. On a complete blank Linux shell without a .vimrc or .vim folder this will download the vim-plug plugin manager and afterwards install all my plugins. All I have to do to set up my Vim environment is to download my .vimrc below and start vim. That’s it.

if empty(glob('~/.vim/autoload/plug.vim'))
  silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  autocmd VimEnter * PlugInstall | source $MYVIMRC
endif
call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-sensible'
Plug 'scrooloose/syntastic'
Plug 'nvie/vim-flake8'
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'ctrlpvim/ctrlp.vim'
Plug 'godlygeek/tabular'
Plug 'jacoborus/tender'
Plug 'ervandew/supertab'
Plug 'sirver/ultisnips'
Plug 'honza/vim-snippets'
call plug#end()

Continue reading My Vim setup for Python programming