Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mgedmin/pytag.vim

Vim plugin: a smarter :tag for Python projects
https://github.com/mgedmin/pytag.vim

Last synced: about 1 month ago
JSON representation

Vim plugin: a smarter :tag for Python projects

Awesome Lists containing this project

README

        

Overview
--------

This plugins provides a smarter ``:tag`` command for Python projects.

Usage::

:Tag name -- jump to a global function
:Tag class.name -- jump to the right class method
:Tag module.class.name -- jump to the right class method
:Tag module.class -- jump to the right class
:Tag package.module.class -- jump to the right class
:Tag package.module -- jump to the right file
:Tag package -- jump to the right file

You still need a tags file. What ``:Tag`` does is filter the tags according
to containing class/filename.

If you want to jump to Python modules and packages, you'll need to generate
your tags file with the ctags option ``--extra=+f``.

Installation
------------

You need Vim with Python support.

I recommend a plugin manager like vim-plug_ ::

Plug 'mgedmin/pytag.vim'

You may also want to consider the following mapping in
~/.vim/ftplugin/python.vim::

" Smarter Ctrl-]
nnoremap pytag#tag_jump_mapping()

.. _vim-plug: https://github.com/junegunn/vim-plug