mirror of
https://github.com/junegunn/fzf.vim.git
synced 2026-09-03 13:27:00 +08:00
@@ -580,11 +580,21 @@ endfunction
|
|||||||
|
|
||||||
function! fzf#vim#tags(query, ...)
|
function! fzf#vim#tags(query, ...)
|
||||||
if empty(tagfiles())
|
if empty(tagfiles())
|
||||||
|
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 s:warn('Preparing tags')
|
||||||
call system('ctags -R')
|
call system('ctags -R')
|
||||||
if empty(tagfiles())
|
if empty(tagfiles())
|
||||||
return s:warn('Failed to create tags')
|
return s:warn('Failed to create tags')
|
||||||
endif
|
endif
|
||||||
|
else
|
||||||
|
return s:warn('No tags found')
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let tagfile = tagfiles()[0]
|
let tagfile = tagfiles()[0]
|
||||||
|
|||||||
Reference in New Issue
Block a user