From 0af9b1ada9c6d8c7d734c0ecdb845c7d3c486282 Mon Sep 17 00:00:00 2001 From: Bernard Pratz Date: Sun, 4 Jan 2015 17:58:00 +0000 Subject: [PATCH 1/2] fixed `tj3man` use for graphical vim instances Signed-off-by: Bernard Pratz --- lib/taskjuggler/VimSyntax.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/taskjuggler/VimSyntax.rb b/lib/taskjuggler/VimSyntax.rb index ef1c976a..3bc1f605 100644 --- a/lib/taskjuggler/VimSyntax.rb +++ b/lib/taskjuggler/VimSyntax.rb @@ -219,7 +219,11 @@ def highlights " Support browsing the man page by typing Shift-k while having the cursor over " any syntax keyword -set keywordprg=tj3man +if !has('gui_running') + set keywordprg=tj3man +else + set keywordprg=tj3man\ --no-colors +endif " Remap Ctrl-] to show full ID of property defined in the current " line. This requires a current ctags file (generated by 'tagfile' From b515d3b47f24bfbe2b6dfa31c654d247fb8ed891 Mon Sep 17 00:00:00 2001 From: Bernard Pratz Date: Sun, 4 Jan 2015 18:35:54 +0000 Subject: [PATCH 2/2] fixed grep command line and shortcut to get identifier name Signed-off-by: Bernard Pratz --- lib/taskjuggler/VimSyntax.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/taskjuggler/VimSyntax.rb b/lib/taskjuggler/VimSyntax.rb index 3bc1f605..965db5e9 100644 --- a/lib/taskjuggler/VimSyntax.rb +++ b/lib/taskjuggler/VimSyntax.rb @@ -228,11 +228,11 @@ def highlights " Remap Ctrl-] to show full ID of property defined in the current " line. This requires a current ctags file (generated by 'tagfile' " report') to be present in the directory where vim was started. -map :call ShowFullID() +map gi :call ShowFullID() function! ShowFullID() let linenumber = line(".") let filename = bufname("%") - execute "!grep '".filename."\t".linenumber.";' tags|cut -f 1" + execute "!grep '".filename."\\s*".linenumber.";' tags|cut -f 1" endfunction augroup TaskJugglerSource