Skip to content

Displays Python class, method or function the cursor is in on the status line

Notifications You must be signed in to change notification settings

xltan/pythonhelper.vim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Overview

Vim script to help moving around in larger Python source files. It displays current class, method or function the cursor is placed in in the status line for every python file. It's more clever than Yegappan Lakshmanan's taglist.vim because it takes into account indetation and comments to determine what tag the cursor is placed in and from version 0.80 doesn't need exuberant ctags utility.

This is a fork of http:https://www.vim.org/scripts/script.php?script_id=435

Needs Vim built with Python support.

Installation

I recommend Vundle, pathogen or Vim Addon Manager. E.g. with Vundle do

:PluginInstall mgedmin/pythonhelper.vim

Manual installation:

  • copy plugin/pythonhelper.vim to ~/.vim/plugin/.
  • copy pythonx/pythonhelper.py to ~/.vim/pythonx/.

Configuration

Add %{TagInStatusLine()} to your 'statusline', e.g.

set statusline=%<%f\ %h%m%r\ %1*%{TagInStatusLine()}%*%=%-14.(%l,%c%V%)\ %P

Alternatives

Tagbar looks like a better-maintained alternative that supports not just Python, but other languages as well.

Copyright

pythonhelper.vim was written by Michal Vitecek. Licence: ???

About

Displays Python class, method or function the cursor is in on the status line

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 82.5%
  • Vim Script 17.5%