From 73cb823d09a8692889aff9e6b4e41fdf76b53e29 Mon Sep 17 00:00:00 2001 From: fievel Date: Mon, 6 Feb 2017 15:54:07 +0100 Subject: [PATCH 1/2] Add note about Universal ctags --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index eceddbe..ae4c100 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,9 @@ creates the tags it needs on-the-fly in-memory without creating any files. ## Dependencies [Vim 7.0](http://www.vim.org/) (But see note below) -[Exuberant ctags 5.5](http://ctags.sourceforge.net/) +[Exuberant ctags 5.5](http://ctags.sourceforge.net/) or +[Universal Ctags](https://ctags.io/) which is a fork of exuberant ctags +continuing the development. ## Installation From 44f114a7cbce480b1d65afb85c723ab1fe6e79b8 Mon Sep 17 00:00:00 2001 From: fievel Date: Fri, 15 Jun 2018 10:27:33 +0200 Subject: [PATCH 2/2] Add map to allow pausing/unpausing tagbar --- autoload/tagbar.vim | 17 +++++++++++++++++ doc/tagbar.txt | 2 ++ plugin/tagbar.vim | 1 + 3 files changed, 20 insertions(+) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index 4d5a1f1..08476fe 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -303,6 +303,7 @@ function! s:MapKeys() abort \ ['togglesort', 'ToggleSort()'], \ ['togglecaseinsensitive', 'ToggleCaseInsensitive()'], \ ['toggleautoclose', 'ToggleAutoclose()'], + \ ['togglepause', 'TogglePause()'], \ ['zoomwin', 'ZoomWindow()'], \ ['close', 'CloseWindow()'], \ ['help', 'ToggleHelp()'], @@ -1832,6 +1833,7 @@ function! s:PrintHelp() abort silent put ='\" ' . s:get_map_str('togglesort') . ': Toggle sort' silent put ='\" ' . s:get_map_str('togglecaseinsensitive') . ': Toggle case insensitive sort option' silent put ='\" ' . s:get_map_str('toggleautoclose') . ': Toggle autoclose option' + silent put ='\" ' . s:get_map_str('togglepause') . ': Toggle pause' silent put ='\" ' . s:get_map_str('zoomwin') . ': Zoom window in/out' silent put ='\" ' . s:get_map_str('close') . ': Close window' silent put ='\" ' . s:get_map_str('help') . ': Toggle help' @@ -3188,6 +3190,21 @@ function! s:warning(msg) abort echohl None endfunction +" s:TogglePause() {{{2 +function! s:TogglePause() abort + let s:paused = !s:paused + + if s:paused + call tagbar#state#set_paused() + else + let fileinfo = tagbar#state#get_current_file(0) + let taginfo = fileinfo.getTags()[0] + + call s:GotoFileWindow(taginfo.fileinfo) + call s:AutoUpdate(taginfo.fileinfo.fpath, 1) + endif +endfunction + " TagbarBalloonExpr() {{{2 function! TagbarBalloonExpr() abort let taginfo = s:GetTagInfo(v:beval_lnum, 1) diff --git a/doc/tagbar.txt b/doc/tagbar.txt index 0efcf37..697c7b1 100644 --- a/doc/tagbar.txt +++ b/doc/tagbar.txt @@ -360,6 +360,8 @@ s Toggle sort order between name and file order. Map option: tagbar_map_togglesort c Toggle the |g:tagbar_autoclose| option. Map option: tagbar_map_toggleautoclose +t Toggle the pause (like :TagbarTogglePause) + Map option: tagbar_map_togglepause x Toggle zooming the window. Map option: tagbar_map_zoomwin q Close the Tagbar window. diff --git a/plugin/tagbar.vim b/plugin/tagbar.vim index 9eee0d0..7634eba 100644 --- a/plugin/tagbar.vim +++ b/plugin/tagbar.vim @@ -116,6 +116,7 @@ function! s:setup_keymaps() abort \ ['togglesort', 's'], \ ['togglecaseinsensitive', 'i'], \ ['toggleautoclose', 'c'], + \ ['togglepause', 't'], \ ['zoomwin', 'x'], \ ['close', 'q'], \ ['help', ['', '?']],