Improve documentation of Command-T support code

This commit is contained in:
ZyX 2014-11-10 00:22:37 +03:00
parent 8cf2a86672
commit a4fddff1fa
2 changed files with 19 additions and 2 deletions

View File

@ -21,6 +21,12 @@ Ctrl-P segments
.. automodule:: powerline.segments.vim.plugin.ctrlp
:members:
Command-T segments
------------------
.. automodule:: powerline.segments.vim.plugin.commandt
:members:
Tagbar segments
---------------

View File

@ -46,8 +46,10 @@ initialized = False
def finder(pl):
'''Display Command-T finder name
Requires $command_t.active_finder and .path methods (code above may
monkey-patch $command_t to add them).
Requires $command_t.active_finder and methods (code above may monkey-patch
$command_t to add them). All Command-T finders have ``CommandT::`` module
prefix, but it is stripped out (actually, any ``CommandT::`` substring will
be stripped out).
'''
initialize()
vim.command('ruby $powerline.commandt_set_active_finder')
@ -66,6 +68,15 @@ FINDERS_WITHOUT_PATH = set((
def path(pl):
'''Display path used by Command-T
Requires $command_t.active_finder and .path methods (code above may
monkey-patch $command_t to add them).
$command_t.active_finder is required in order to omit displaying path for
finders ``MRUBufferFinder``, ``BufferFinder``, ``TagFinder`` and
``JumpFinder`` (pretty much any finder, except ``FileFinder``).
'''
initialize()
vim.command('ruby $powerline.commandt_set_active_finder')
finder = vim.eval('g:powerline_commandt_reply')