From b25ab098da6db6d81bcac152afc1aa5e984941d6 Mon Sep 17 00:00:00 2001 From: Jan Larres Date: Mon, 25 Apr 2011 16:09:40 +1200 Subject: [PATCH] Allow jumping to a tag definition without leaving the Tagbar window --- doc/tagbar.txt | 4 +++- plugin/tagbar.vim | 15 +++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/doc/tagbar.txt b/doc/tagbar.txt index 9a752a2..c5ecca1 100644 --- a/doc/tagbar.txt +++ b/doc/tagbar.txt @@ -240,7 +240,9 @@ KEY MAPPINGS *tagbar-keys* These mappings are valid in the Tagbar window: Display key mapping help. -/ Jump to the tag under the cursor. Doesn't work for pseudo-tags. +/ Jump to the tag under the cursor. Doesn't work for pseudo-tags + or generic headers. +p Jump to the tag under the cursor, but stay in the Tagbar window. When on a fold icon, open or close the fold depending on the current state. <2-LeftMouse> Same as . diff --git a/plugin/tagbar.vim b/plugin/tagbar.vim index 08754dd..1756431 100644 --- a/plugin/tagbar.vim +++ b/plugin/tagbar.vim @@ -23,6 +23,8 @@ if &cp || exists('g:loaded_tagbar') endif " Initialization {{{1 + +" Basic init {{{2 if !exists('g:tagbar_ctags_bin') if executable('ctags-exuberant') let g:tagbar_ctags_bin = 'ctags-exuberant' @@ -790,9 +792,10 @@ endfunction " s:MapKeys() {{{2 function! s:MapKeys() - nnoremap