1
0
mirror of https://github.com/gryf/tagbar.git synced 2025-12-18 03:50:26 +01:00

Improved s:EscapeCtagsCmd() for windows cmd.exe to eliminate issues when

a:ctags_bin calls a batch file that uses %~dp0. Changes include:
- Enable ctags_args to be a list
- Changed default ctags_args to be a list to improve robustness of
  s:EscapeCtagsCmd()
- Do not escape 0th argument of ctags_cmd for cmd.exe when it is not
  necessary because otherwise batch files may not return expected value
  for %~dp0
- Updated tagbar documentation about string and list value types for
  ctags_args
See https://github.com/majutsushi/tagbar/issues/133
This commit is contained in:
Darcy Parker
2013-04-02 17:57:30 -04:00
parent dec1f840fb
commit d0df97040b
2 changed files with 104 additions and 26 deletions

View File

@@ -268,7 +268,7 @@ COMMANDS *tagbar-commands*
an alias for ":TagbarOpen fjc".
:TagbarTogglePause *:TagbarTogglePause*
Freezes/Unfreezes the Tagbar window. Stops the contents of the window
Freezes/Unfreezes the Tagbar window. Stops the contents of the window
from changing when a different source file is selected.
:TagbarSetFoldlevel[!] {number} *:TagbarSetFoldlevel*
@@ -793,6 +793,25 @@ ctagsargs: The arguments to be passed to the filetype-specific ctags program
program output its data on stdout. Not used for the normal ctags
program.
The value of ctagsargs may be a |List| of strings (a string for
each argument), or a single string (|expr-string|) of all the
arguments.
When the value of ctagsargs is a list, tagbar.vim takes care of
escaping each argument in the list as required for the current
|'shell'| type.
When the value of ctagsargs is a string, it must be properly
escaped (if required by the current shell type). The reason
tagbar.vim does not attempt to escape the string in this case is
because if there is a space, it is ambiguous as to whether the
space is delimiting an argument or included in the argument. To
avoid this amiguity, tagbar.vim expects the string to be already
escaped as required.
If special escaping is required for different OS shell types or if
in doubt, then it is recommended to define ctagsargs with a List.
You then have to assign this dictionary to a variable in your vimrc with the
name