From 53053c9756c253a23b0af0aeb81940e25ec99d7e Mon Sep 17 00:00:00 2001 From: Edgar Hipp Date: Fri, 29 May 2015 11:20:00 +0200 Subject: [PATCH] Updated Examples (vim) (markdown) --- Examples-(vim).md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Examples-(vim).md b/Examples-(vim).md index 14bf492..519baaa 100644 --- a/Examples-(vim).md +++ b/Examples-(vim).md @@ -77,6 +77,17 @@ command! -bar FZFTags if !empty(tagfiles()) | call fzf#run({ \ }) | else | echo 'Preparing tags' | call system('ctags -R') | FZFTag | endif ``` +Jump to tags only in current file: + +```vim +command! FZFTagFile if !empty(tagfiles()) | call fzf#run({ +\ 'source': "cat " . tagfiles()[0] . ' | grep "' . expand('%:@') . '"' . " | sed -e '/^\\!/d;s/\t.*//' ". ' | uniq', +\ 'sink': 'tag', +\ 'options': '+m', +\ 'left': 60, +\ }) | else | echo 'No tags' | endif +``` + ### Search lines in all open vim buffers ```vimL