mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-18 16:45:38 -05:00
Updated Examples (vim) (markdown)
@@ -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')})
|
||||
|
||||
Reference in New Issue
Block a user