Merge pull request #62 from telemenar/add_option_for_git_log
Pull out the git log command as an option
This commit is contained in:
commit
1d8b4bdcf9
3 changed files with 9 additions and 2 deletions
|
@ -97,6 +97,9 @@ let g:fzf_action = {
|
||||||
" - window (nvim only)
|
" - window (nvim only)
|
||||||
let g:fzf_layout = { 'down': '~40%' }
|
let g:fzf_layout = { 'down': '~40%' }
|
||||||
|
|
||||||
|
" For Commits and BCommits to 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"'
|
||||||
|
|
||||||
" Advanced customization using autoload functions
|
" Advanced customization using autoload functions
|
||||||
autocmd VimEnter * command! Colors
|
autocmd VimEnter * command! Colors
|
||||||
\ call fzf#vim#colors({'left': '15%', 'options': '--reverse --margin 30%,0'})
|
\ call fzf#vim#colors({'left': '15%', 'options': '--reverse --margin 30%,0'})
|
||||||
|
|
|
@ -729,7 +729,7 @@ function! s:commits(buffer_local, args)
|
||||||
return s:warn('Not in git repository')
|
return s:warn('Not in git repository')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let source = 'git log --graph --color=always --format="%C(auto)%h%d %s %C(black)%C(bold)%cr"'
|
let source = 'git log '.get(g:, 'fzf_commits_log_options', '--graph --color=always --format="%C(auto)%h%d %s %C(black)%C(bold)%cr"')
|
||||||
let current = expand('%:S')
|
let current = expand('%:S')
|
||||||
let managed = 0
|
let managed = 0
|
||||||
if !empty(current)
|
if !empty(current)
|
||||||
|
|
|
@ -115,7 +115,7 @@ But its functionality is still available via `call pathogen#helptags()`.)
|
||||||
< Customization >_____________________________________________________________~
|
< Customization >_____________________________________________________________~
|
||||||
*fzf-vim-customization*
|
*fzf-vim-customization*
|
||||||
|
|
||||||
*g:fzf_action* *g:fzf_layout*
|
*g:fzf_action* *g:fzf_layout* *g:fzf_commits_log_options*
|
||||||
>
|
>
|
||||||
" This is the default extra key bindings
|
" This is the default extra key bindings
|
||||||
let g:fzf_action = {
|
let g:fzf_action = {
|
||||||
|
@ -126,6 +126,10 @@ But its functionality is still available via `call pathogen#helptags()`.)
|
||||||
" Default fzf layout
|
" Default fzf layout
|
||||||
let g:fzf_layout = { 'down': '40%' }
|
let g:fzf_layout = { 'down': '40%' }
|
||||||
|
|
||||||
|
" For Commits and BCommits to 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"'
|
||||||
|
|
||||||
" Advanced customization using autoload functions
|
" Advanced customization using autoload functions
|
||||||
autocmd VimEnter * command! Colors
|
autocmd VimEnter * command! Colors
|
||||||
\ call fzf#vim#colors({'left': '15%', 'options': '--reverse --margin 30%,0'})
|
\ call fzf#vim#colors({'left': '15%', 'options': '--reverse --margin 30%,0'})
|
||||||
|
|
Loading…
Add table
Reference in a new issue