mirror of
https://github.com/junegunn/fzf.vim.git
synced 2026-01-18 09:05:15 +08:00
@@ -580,10 +580,20 @@ endfunction
|
||||
|
||||
function! fzf#vim#tags(query, ...)
|
||||
if empty(tagfiles())
|
||||
call s:warn('Preparing tags')
|
||||
call system('ctags -R')
|
||||
if empty(tagfiles())
|
||||
return s:warn('Failed to create tags')
|
||||
call inputsave()
|
||||
echohl WarningMsg
|
||||
let gen = input('tags not found. Generate? (y/N) ')
|
||||
echohl None
|
||||
call inputrestore()
|
||||
redraw
|
||||
if gen =~ '^y'
|
||||
call s:warn('Preparing tags')
|
||||
call system('ctags -R')
|
||||
if empty(tagfiles())
|
||||
return s:warn('Failed to create tags')
|
||||
endif
|
||||
else
|
||||
return s:warn('No tags found')
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user