Subscribe Free

Join 2670+ others. No spamming.
I promise!

We are currently under high development. Follow us at github.

Looking for Python Tutorials?
Check these awesome tutorials



python-mode / python-mode


Vim python-mode. PyLint, Rope, Pydoc, breakpoints from box.


logo Python-mode, Python in VIM

The project needs contributors

** Python-mode Slack Channel is here: **

Python-mode is a vim plugin that helps you to create python code very quickly by utilizing libraries including pylint, rope, pydoc, pyflakes, pep8, autopep8, pep257 and mccabe for features like static analysis, refactoring, folding, completion, documentation, and more.

The plugin contains all you need to develop python applications in Vim.

There is no need to install pylint, rope or any other Python Libraries on your system.

  • Support Python version 2.6+ and 3.2+
  • Syntax highlighting
  • Virtualenv support
  • Run python code (<leader>r)
  • Add/remove breakpoints (<leader>b)
  • Improved Python indentation
  • Python folding
  • Python motions and operators (]], 3[[, ]]M, vaC, viM, daC, ciM, ...)
  • Code checking (pylint, pyflakes, pylama, ...) that can be run simultaneously (:PymodeLint)
  • Autofix PEP8 errors (:PymodeLintAuto)
  • Search in python documentation (K)
  • Code refactoring <rope refactoring library> (rope)
  • Strong code completion (rope)
  • Go to definition (<C-c>g for :RopeGotoDefinition)
  • And more, more ...

See (very old) screencast here: (sorry for quality, this is my first screencast) Another old presentation here:

To read python-mode documentation in Vim, see :help pymode


  • VIM >= 7.3 (mostly features needed +python or +python3 support) (also --with-features=big if you want g:pymode_lint_signs)

How to install

Using pathogen (recommended)

% cd ~/.vim
% mkdir -p bundle && cd bundle
% git clone
  • Enable pathogen in your ~/.vimrc:

    " Pathogen load
    filetype off
    call pathogen#infect()
    call pathogen#helptags()
    filetype plugin indent on
    syntax on


% git clone
% cd python-mode
% cp -R * ~/.vim

Then rebuild helptags in vim:

:helptags ~/.vim/doc/


filetype-plugin (:help filetype-plugin-on) and filetype-indent (:help filetype-indent-on) must be enabled to use python-mode.

Debian packages

|Repository URL:

Install with commands:

add-apt-repository main
apt-get update
apt-get install vim-python-mode

If you are getting the message: "The following signatures couldn't be verified because the public key is not available":

apt-key adv --keyserver --recv-keys B5DF65307000E266

vim-python-mode using vim-addons, so after installation just enable python-mode with command:

vim-addons install python-mode


If your python-mode doesn't work:

  1. Load Vim with only python-mode enabled (use debug.vim from pymode):

    vim -u <path_to_pymode>/debug.vim

And try to repeat your case. If no error occurs, seems like problem isn't in the plugin.

  1. Type :PymodeTroubleshooting

And fix any warnings or copy the output and send it to me. (For example, by creating a new github issue if one does not already exist for the problem).


You can override the default key bindings by redefining them in your .vimrc, for example:

" Override go-to.definition key shortcut to Ctrl-]
let g:pymode_rope_goto_definition_bind = "<C-]>"

" Override run current python file key shortcut to Ctrl-Shift-e
let g:pymode_run_bind = "<C-S-e>"

" Override view python doc key shortcut to Ctrl-Shift-d
let g:pymode_doc_bind = "<C-S-d>"

Frequent Problems

Read this section before opening an issue on the tracker.

Python 3 Syntax

By default python-mode uses python 2 syntax checking. To enable python 3 syntax checking (e.g. for async) add:

let g:pymode_python = 'python3'

To your vimrc or exrc file


Documentation is available in your vim :help pymode


If you have any suggestions, bug reports or annoyances please report them to the issue tracker at


Also see the AUTHORS file.

Development of python-mode happens at github:

Please make a pull request to development branch and add yourself to AUTHORS.

Source Links

Python Libraries

Vendored Python modules are located mostly in pymode/libs/.











Vim Libraries

Vendored Vim modules are located mostly in t/.

Python syntax for vim

PEP8 VIM indentation


Copyright © 2013-2015 Kirill Klenov (klen)


Licensed under a GNU lesser general public license.

If you like this plugin, I would very appreciated if you kindly send me a postcard :) My address is here: "Russia, 143500, MO, Istra, pos. Severny 8-3" to "Kirill Klenov". Thanks for support!