Mercurial > vim-gutentags
diff 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 |
line wrap: on
line diff
--- a/plugin/gutentags.vim Mon Mar 16 07:04:03 2015 -0700 +++ b/plugin/gutentags.vim Thu Apr 09 21:02:25 2015 -0700 @@ -67,6 +67,10 @@ let g:gutentags_cache_dir = fnamemodify(g:gutentags_cache_dir, ':s?[/\\]$??') endif +if !exists('g:gutentags_define_advanced_commands') + let g:gutentags_define_advanced_commands = 0 +endif + if g:gutentags_cache_dir != '' && !isdirectory(g:gutentags_cache_dir) call mkdir(g:gutentags_cache_dir, 'p') endif @@ -93,15 +97,12 @@ " Toggles and Miscellaneous Commands {{{ -function! s:delete_lock_files() abort - for tagfile in values(b:gutentags_files) - silent call delete(tagfile.'.lock') - endfor -endfunction +command! GutentagsUnlock :call gutentags#delete_lock_files() -command! GutentagsToggleEnabled :let g:gutentags_enabled=!g:gutentags_enabled -command! GutentagsToggleTrace :call gutentags#trace() -command! GutentagsUnlock :call s:delete_lock_files() +if g:gutentags_define_advanced_commands + command! GutentagsToggleEnabled :let g:gutentags_enabled=!g:gutentags_enabled + command! GutentagsToggleTrace :call gutentags#trace() +endif if g:gutentags_debug command! GutentagsToggleFake :call gutentags#fake()