1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 13:50:05 +08:00

Improve gtags layer (#4172)

This commit is contained in:
Wang Shidong 2021-05-31 23:18:28 +08:00 committed by GitHub
parent 2d0506c566
commit 00ffd4a5ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 12 deletions

View File

@ -23,10 +23,6 @@ let g:gtags_global_command = get(g:, 'gtags_global_command',
\ empty($GTAGSGLOBAL) ? 'global' : $GTAGSGLOBAL
\ )
""
" Enable/Disable default mappings. By default it is disabled.
let g:gtags_auto_map = get(g:, 'gtags_auto_map', 0)
""
" This setting will open the |quickfix| list when adding entries. A value of 2 will
" preserve the cursor position when the |quickfix| window is
@ -308,12 +304,15 @@ function! s:ExecLoad(option, long_option, pattern) abort
" Parse the output of 'global -x or -t' and show in the quickfix window.
let l:efm_org = &efm
let &efm = g:Gtags_Efm
if l:result =~# '\n.'
cgetexpr l:result
else
cexpr! l:result
endif
cgetexpr l:result
let &efm = l:efm_org
" If there is only one item, jump to the position.
if len(getqflist()) ==# 1
cnext
endif
endfunction
let s:prev_windows = []

View File

@ -20,9 +20,6 @@ CONFIGURATION *gtags-config*
Set the global command name. If it is not set, will use $GTAGSGLOBAL, and if
$GTAGSGLOBAL still is an empty string, then will use 'global'.
*g:gtags_auto_map*
Enable/Disable default mappings. By default it is disabled.
*g:gtags_open_list*
This setting will open the |quickfix| list when adding entries. A value of 2
will preserve the cursor position when the |quickfix| window is opened.