From a4fddff1fa1d46bc9436df69b6a2b478470622da Mon Sep 17 00:00:00 2001 From: ZyX Date: Mon, 10 Nov 2014 00:22:37 +0300 Subject: [PATCH] Improve documentation of Command-T support code --- docs/source/configuration/segments/vim.rst | 6 ++++++ powerline/segments/vim/plugin/commandt.py | 15 +++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/docs/source/configuration/segments/vim.rst b/docs/source/configuration/segments/vim.rst index cb7b3429..eeadd4f1 100644 --- a/docs/source/configuration/segments/vim.rst +++ b/docs/source/configuration/segments/vim.rst @@ -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 --------------- diff --git a/powerline/segments/vim/plugin/commandt.py b/powerline/segments/vim/plugin/commandt.py index e48a0d2f..c51a9146 100644 --- a/powerline/segments/vim/plugin/commandt.py +++ b/powerline/segments/vim/plugin/commandt.py @@ -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')