Mercurial > vim-gutentags
comparison plugin/gutentags.vim @ 46:c0f56e4d52bd
Make a bunch of advanced commands opt-in only.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 09 Apr 2015 21:02:25 -0700 |
parents | 99328cb71e75 |
children | ea7780912296 |
comparison
equal
deleted
inserted
replaced
45:64de69ca7195 | 46:c0f56e4d52bd |
---|---|
65 let g:gutentags_cache_dir = '' | 65 let g:gutentags_cache_dir = '' |
66 else | 66 else |
67 let g:gutentags_cache_dir = fnamemodify(g:gutentags_cache_dir, ':s?[/\\]$??') | 67 let g:gutentags_cache_dir = fnamemodify(g:gutentags_cache_dir, ':s?[/\\]$??') |
68 endif | 68 endif |
69 | 69 |
70 if !exists('g:gutentags_define_advanced_commands') | |
71 let g:gutentags_define_advanced_commands = 0 | |
72 endif | |
73 | |
70 if g:gutentags_cache_dir != '' && !isdirectory(g:gutentags_cache_dir) | 74 if g:gutentags_cache_dir != '' && !isdirectory(g:gutentags_cache_dir) |
71 call mkdir(g:gutentags_cache_dir, 'p') | 75 call mkdir(g:gutentags_cache_dir, 'p') |
72 endif | 76 endif |
73 | 77 |
74 if has('win32') | 78 if has('win32') |
91 | 95 |
92 " }}} | 96 " }}} |
93 | 97 |
94 " Toggles and Miscellaneous Commands {{{ | 98 " Toggles and Miscellaneous Commands {{{ |
95 | 99 |
96 function! s:delete_lock_files() abort | 100 command! GutentagsUnlock :call gutentags#delete_lock_files() |
97 for tagfile in values(b:gutentags_files) | |
98 silent call delete(tagfile.'.lock') | |
99 endfor | |
100 endfunction | |
101 | 101 |
102 command! GutentagsToggleEnabled :let g:gutentags_enabled=!g:gutentags_enabled | 102 if g:gutentags_define_advanced_commands |
103 command! GutentagsToggleTrace :call gutentags#trace() | 103 command! GutentagsToggleEnabled :let g:gutentags_enabled=!g:gutentags_enabled |
104 command! GutentagsUnlock :call s:delete_lock_files() | 104 command! GutentagsToggleTrace :call gutentags#trace() |
105 endif | |
105 | 106 |
106 if g:gutentags_debug | 107 if g:gutentags_debug |
107 command! GutentagsToggleFake :call gutentags#fake() | 108 command! GutentagsToggleFake :call gutentags#fake() |
108 endif | 109 endif |
109 | 110 |