diff --git a/README.md b/README.md index 08e27a7..ce74f65 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/autoload/fzf/vim.vim b/autoload/fzf/vim.vim index 7b08576..12fb4eb 100644 --- a/autoload/fzf/vim.vim +++ b/autoload/fzf/vim.vim @@ -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 diff --git a/doc/fzf-vim.txt b/doc/fzf-vim.txt index 10dab45..b8d82e7 100644 --- a/doc/fzf-vim.txt +++ b/doc/fzf-vim.txt @@ -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~