sponsor Vim development Vim logo Vim Book Ad

python.vim : A set of menus/shortcuts to work with Python files

 script karma  Rating 1246/503, Downloaded by 43511  Comments, bugs, improvements  Vim wiki

created by
Jon Franklin
script type
Written by Mikael Berthe.

This script can be useful when editing Python scripts. It provides the following menus:
- Select a block of lines with the same indentation
- Select a function
- Select a class
- Go to previous/next class/function
- Go to the beginning/end of a block
- Comment/uncomment the selection
- Jump to the last/next line with the same indent
- Shift a block (left/right)
- Creates list of classes and functions for easy code navigation
Version 1.8+ requires Vim 7, earlier versions require Vim 6
install details
Copy to the $VIMFILES/ftplugin directory.  For more information, please read the beginning of the script...

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
python_fn.vim 1.13 2008-08-29 7.0 Jon Franklin Fix for bug that prevented multi-line class and function definitions from showing up in the IM-Python menu.  Patch provided by Branden Rolston.
python_fn.vim 1.12 2008-05-17 7.0 Jon Franklin * Changed to ftplugin and renamed to avoid collision with vim's ftplugin/python.vim. Patch provided by Christopher Lambacher
* Fixed error opening python buffer with no classes or functions.  Patch provided by Chris Farrow
* Removed duplicate ]f key
*Fixed block manipulation bugs due to collision on ]], [[ mappings. See menu for new mappings
python.vim 1.11 2006-11-29 7.0 Jon Franklin Add shortcuts for all remaining menu options.
python.vim 1.10 2006-11-08 7.0 Jon Franklin Add shortcuts for commenting/uncommenting selections.
python.vim 1.9 2006-08-26 6.0 Jon Franklin Fixed bug in IM-Python menu where function and class names beginning with "_" were not included.
python.vim 1.8 2006-08-17 6.0 Mikael Berthe Applied a patch from Jon Franklin: IM-Python menu improvements.
Updated copyright and email address.
python.vim 1.7 2003-07-25 6.0 Mikael Berthe Use <Down> instead of 'j', so it should work when j is mapped.
python.vim 1.6 2003-06-12 6.0 Mikael Berthe Works better with folding... Many thanks to Guy L. Oliver!
python.vim 1.5 2003-01-16 6.0 Mikael Berthe Same as 1.4, I just fixed a typo in the comments and my e-mail address...
python.vim 1.4 2001-09-05 6.0 Mikael Berthe Entry for Adam's IM-Python menu update in the main script menu; some other minor changes...
python.vim 1.3 2001-08-22 6.0 adam seyfarth I've added an IM-Python menu that holds the class definitions and function definitions.
python.vim 1.1 2001-07-07 6.0 Mikael Berthe * Changed the name of the global variable
* Added a new variable; one can choose not to select trailing comments
python.vim 1.0 2001-07-07 6.0 Mikael Berthe Initial upload
python.vim 1.0 2001-07-07 6.0 Mikael Berthe Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.