diff --git a/Examples-(vim).md b/Examples-(vim).md index d3b1de2..a866f87 100644 --- a/Examples-(vim).md +++ b/Examples-(vim).md @@ -101,6 +101,9 @@ command! -bar Tags if !empty(tagfiles()) | call fzf#run({ This version better handles same tags across different files. ```vim +" ---------------------------------------------------------------------------- +" Tags +" ---------------------------------------------------------------------------- function! s:tags_sink(line) let parts = split(a:line, '\t\zs') let excmd = matchstr(parts[2:], '^.*\ze;"\t') @@ -119,7 +122,8 @@ function! s:tags() endif call fzf#run({ - \ 'source': 'grep -v ^! '.join(map(tagfiles(), 'fnamemodify(v:val, ":S")')), + \ 'source': 'cat '.join(map(tagfiles(), 'fnamemodify(v:val, ":S")')). + \ '| grep -v ^!', \ 'options': '+m -d "\t" --with-nth 1,4.. -n 1 --tiebreak=index', \ 'down': '40%', \ 'sink': function('s:tags_sink')})