mirror of
https://github.com/junegunn/fzf.vim.git
synced 2026-05-24 17:28:43 +08:00
+14
-4
@@ -580,10 +580,20 @@ endfunction
|
|||||||
|
|
||||||
function! fzf#vim#tags(query, ...)
|
function! fzf#vim#tags(query, ...)
|
||||||
if empty(tagfiles())
|
if empty(tagfiles())
|
||||||
call s:warn('Preparing tags')
|
call inputsave()
|
||||||
call system('ctags -R')
|
echohl WarningMsg
|
||||||
if empty(tagfiles())
|
let gen = input('tags not found. Generate? (y/N) ')
|
||||||
return s:warn('Failed to create tags')
|
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
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user