[Tags] Add g:fzf_tags_command

Close #138
This commit is contained in:
Junegunn Choi
2016-05-12 01:42:24 +09:00
parent 94bdefe123
commit 47806da408
3 changed files with 9 additions and 3 deletions

View File

@@ -125,8 +125,11 @@ let g:fzf_colors =
" [Buffers] Jump to the existing window if possible
let g:fzf_buffers_jump = 1
" [[B]Commits] to customize the options used by 'git log':
" [[B]Commits] Customize the options used by 'git log':
let g:fzf_commits_log_options = '--graph --color=always --format="%C(auto)%h%d %s %C(black)%C(bold)%cr"'
" [Tags] Command to generate tags file
let g:fzf_tags_command = 'ctags -R'
```
#### Advanced customization using autoload functions

View File

@@ -632,7 +632,7 @@ function! fzf#vim#tags(query, ...)
redraw
if gen =~ '^y'
call s:warn('Preparing tags')
call system('ctags -R')
call system(get(g:, 'fzf_tags_command', 'ctags -R'))
if empty(tagfiles())
return s:warn('Failed to create tags')
endif

View File

@@ -154,9 +154,12 @@ Command-local options~
" [Buffers] Jump to the existing window if possible
let g:fzf_buffers_jump = 1
" [[B]Commits] to customize the options used by 'git log':
" [[B]Commits] Customize the options used by 'git log':
let g:fzf_commits_log_options = \
'--graph --color=always --format="%C(auto)%h%d %s %C(black)%C(bold)%cr"'
" [Tags] Command to generate tags file
let g:fzf_tags_command = 'ctags -R'
<
Advanced customization using autoload functions~