aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Odding <peter@peterodding.com>2014-11-21 22:35:26 +0100
committerPeter Odding <peter@peterodding.com>2014-11-21 22:35:26 +0100
commit8925dc699830e8e018efb36c60b14596b065fe9c (patch)
tree21fe2a3dd7fc43a3e560f626d260f7877b35b50b
parent075ffe9054dd71f8c2f26fe9cfa4fd5200e6af96 (diff)
downloadvim-easytags-8925dc699830e8e018efb36c60b14596b065fe9c.tar.gz
Improve handling & docs of g:easytags_opts option (issue #98)
-rw-r--r--README.md6
-rw-r--r--autoload/xolox/easytags.vim6
-rw-r--r--doc/easytags.txt9
3 files changed, 16 insertions, 5 deletions
diff --git a/README.md b/README.md
index ba1d6ea..1d8f39b 100644
--- a/README.md
+++ b/README.md
@@ -64,7 +64,11 @@ If you rely entirely on language-specific configuration and don't have a general
### The `g:easytags_opts` option
-If you need to pass custom command line option(s) to the program specified by `g:easytags_cmd` you can set this option to a list of strings to be passed to Exuberant Ctags. Make sure to only use options that are valid in any context, for example the concatenation of `g:easytags_cmd`, `g:easytags_opts` and `--list-languages` should work as expected.
+If you need to pass custom command line option(s) to the program specified by `g:easytags_cmd` you can set this option to a list of strings to be passed to Exuberant Ctags. Make sure to only use options that are valid in any context, for example the concatenation of `g:easytags_cmd`, `g:easytags_opts` and `--list-languages` should work as expected. Here's an example:
+
+ :let g:easytags_opts = ['--options=$VIM\ctags\ctags.cnf']
+
+The example above (based on [issue 98] [98]) overrides the location of Exuberant Ctags' configuration file. As you can see the command line option(s) may contain environment variables, these will be expanded before passing the options to Exuberant Ctags (to make sure it works in all environments).
### The `g:easytags_async` option
diff --git a/autoload/xolox/easytags.vim b/autoload/xolox/easytags.vim
index ea0fd22..2eab07a 100644
--- a/autoload/xolox/easytags.vim
+++ b/autoload/xolox/easytags.vim
@@ -1,9 +1,9 @@
" Vim script
" Author: Peter Odding <peter@peterodding.com>
-" Last Change: November 13, 2014
+" Last Change: November 21, 2014
" URL: http://peterodding.com/code/vim/easytags/
-let g:xolox#easytags#version = '3.9'
+let g:xolox#easytags#version = '3.9.1'
let g:xolox#easytags#default_pattern_prefix = '\C\<'
let g:xolox#easytags#default_pattern_suffix = '\>'
@@ -439,7 +439,7 @@ function! xolox#easytags#ctags_command() " {{{2
let options = xolox#misc#option#get('easytags_opts')
if !empty(options)
let command_line = [program]
- call extend(command_line, map(copy(options), 'xolox#misc#escape#shell(v:val)'))
+ call extend(command_line, map(copy(options), 'xolox#misc#escape#shell(expand(v:val))'))
let program = join(command_line)
endif
return program
diff --git a/doc/easytags.txt b/doc/easytags.txt
index 6c1a5a6..913b020 100644
--- a/doc/easytags.txt
+++ b/doc/easytags.txt
@@ -194,7 +194,14 @@ If you need to pass custom command line option(s) to the program specified by
|g:easytags_cmd| you can set this option to a list of strings to be passed to
Exuberant Ctags. Make sure to only use options that are valid in any context,
for example the concatenation of |g:easytags_cmd|, |g:easytags_opts| and
-'--list-languages' should work as expected.
+'--list-languages' should work as expected. Here's an example:
+>
+ :let g:easytags_opts = ['--options=$VIM\ctags\ctags.cnf']
+<
+The example above (based on [issue 98] [98]) overrides the location of
+Exuberant Ctags' configuration file. As you can see the command line option(s)
+may contain environment variables, these will be expanded before passing the
+options to Exuberant Ctags (to make sure it works in all environments).
-------------------------------------------------------------------------------
The *g:easytags_async* option