python

Setup

Three ways to check if your version of vim includes support for python:

  • has should return 1:

    :echo has('python')
    
  • filetype should return python (when editing a python file):

    :set filetype
    
  • run the version command, Config.

If your version of vim does not include support for python, install a version which does, Install.

Auto Complete

The default vim installation (with python support) will support the omni-completion feature using this keyboard shortcut:

  • Ctrl X, Ctrl O

    Install the SuperTab plugin, SuperTab, to use the tab key rather than this rather complicated shortcut.

  • A newer version of pythoncomplete.vim can be downloaded from http://www.vim.org/scripts/script.php?script_id=1542

    Copy the file to your autoload folder, on my workstation:

    C:\tools\vim\vim71\autoload\