1
0
mirror of https://github.com/gryf/python.vim.git synced 2025-12-17 11:30:22 +01:00
2017-06-04 14:46:08 +02:00
2017-06-04 14:46:08 +02:00

This is a set of menus/shortcuts to work with Python files. This work is kind continuation of Mikael Berthe script, with some improvements and fixes.

Installation

To install it, any kind of Vim package manager can be used, like NeoBundle, Pathogen, Vundle or vim-plug.

For manual installation, copy subdirectories from this repository to your ~/.vim directory.

Usage

Default shortcuts are as follows:

  • ]] - jump to next class

  • [[ - jump to previous class

  • )) - jump to next function or method

  • (( - jump to previous function or method

  • ]t - jump to beginning of block

  • ]e - jump to end of block

  • ]<up> - jump to previous line with the same/lower indentation

  • ]<down> - jump to next line with the same/lower indentation

  • ]< - shift block to left

  • ]> - shift block to right

  • ]# - comment selection

  • ]u - uncomment selection

  • vac - select (Visual Line Mode) current/previous class

  • vaf - select (Visual Line Mode) current/previous function

  • vab - select (Visual Line Mode) block

You can set the global variable g:py_select_leading_comments to 0 if you don't want to select comments preceding a declaration (these are usually the description of the function/class). You can set the global variable g:py_select_trailing_comments to 0 if you don't want to select comments at the end of a function/class. If these variables are not defined, both leading and trailing comments are selected.

If you use graphical version of vim (like gvim) you can access those options through the menu called Python.

Description
A set of menus/shortcuts to work with Python files
Readme 121 KiB
Languages
Vim script 100%