m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 16:45:38 -05:00

Updated Examples (vim) (markdown)

Junegunn Choi
2015-08-09 23:00:04 +09:00
parent 8a8526a4f1
commit 876a1aa653

@@ -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')})