From 3661409e952b8532a2088226de886aea0489e281 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Wed, 18 Apr 2018 14:09:54 +0900 Subject: [PATCH] [BTags] Group tags by scope Related #620 --- autoload/fzf/vim.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/autoload/fzf/vim.vim b/autoload/fzf/vim.vim index 8804035..3da0242 100644 --- a/autoload/fzf/vim.vim +++ b/autoload/fzf/vim.vim @@ -744,9 +744,10 @@ function! fzf#vim#buffer_tags(query, ...) let args = copy(a:000) let escaped = fzf#shellescape(expand('%')) let null = s:is_win ? 'nul' : '/dev/null' + let sort = executable('sort') ? '| sort -s -k 5' : '' let tag_cmds = (len(args) > 1 && type(args[0]) != type({})) ? remove(args, 0) : [ - \ printf('ctags -f - --sort=yes --excmd=number --language-force=%s %s 2> %s', &filetype, escaped, null), - \ printf('ctags -f - --sort=yes --excmd=number %s 2> %s', escaped, null)] + \ printf('ctags -f - --sort=yes --excmd=number --language-force=%s %s 2> %s %s', &filetype, escaped, null, sort), + \ printf('ctags -f - --sort=yes --excmd=number %s 2> %s %s', escaped, null, sort)] if type(tag_cmds) != type([]) let tag_cmds = [tag_cmds] endif