Vim Tips Wiki


1,624pages on
this wiki
Add New Page

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Use this page to discuss script 30 python: menus/shortcuts to work with Python

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on
  • This page may be out of date: check the script's page above, and its release notes.


]t Jump to beginning of block
]e Jump to end of block
]v Select block (visual line mode)
]< Shift block to left
]> Shift block to right
]# Comment selection
]u Uncomment selection
]c Select current/previous class
]d Select current/previous function
]<up> Jump to previous line with same/lower indentation
]<down> Jump to next line with same/lower indentation


I would suggest using "normal! " in the script as suggested here (

I had to locally modify the plugin to work correctly since I remapped <Up>,<Down>, etc..

I've noticed that at least some of the movement commands (]j, ]J, ]f and ]F at least) don't update the jumplist, so CTRL+O doesn't flip the user back to their previous position. An easy solution would be to modify the script to manually add the previous position to the jumplist by changing the mappings from this:

map ]j  :call PythonDec("class", 1)<CR>

to this:

map ]j  m':call PythonDec("class", 1)<CR>

There may well be a more elegant solution, but that seems to have worked for me.

Also on Fandom

Random Wiki