diff autoload/gutentags/ctags.vim @ 49:70423c2202c5

Ctags options files changes * Remove the `g:gutentags_ctags_options_file` setting since it's mostly useless. * Use the script's `-o` option to pass a `.ctags` file in the project root if it exists. * Add documentation.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 09 Apr 2015 22:00:37 -0700
parents 64de69ca7195
children 9e768b83d701
line wrap: on
line diff
--- a/autoload/gutentags/ctags.vim	Thu Apr 09 21:46:54 2015 -0700
+++ b/autoload/gutentags/ctags.vim	Thu Apr 09 22:00:37 2015 -0700
@@ -6,10 +6,6 @@
     let g:gutentags_executable = 'ctags'
 endif
 
-if !exists('g:gutentags_ctags_options_file')
-    let g:gutentags_ctags_options_file = ''
-endif
-
 if !exists('g:gutentags_tagfile')
     let g:gutentags_tagfile = 'tags'
 endif
@@ -61,8 +57,9 @@
         if g:gutentags_pause_after_update
             let l:cmd .= ' -c'
         endif
-        if len(g:gutentags_ctags_options_file)
-            let l:cmd .= ' -o "' . g:gutentags_ctags_options_file . '"'
+        let l:proj_options_file = a:proj_dir . '/.ctags'
+        if filereadable(l:proj_options_file)
+            let l:cmd .= ' -o "' . l:proj_options_file . '"'
         endif
         if g:gutentags_trace
             if has('win32')