[[B]Commits] Enable preview window by default

Close #461
This commit is contained in:
Junegunn Choi 2017-10-08 03:44:28 +09:00
parent b24038960e
commit 121bd70fcf
No known key found for this signature in database
GPG key ID: 254BC280FEF9C627

View file

@ -1101,6 +1101,11 @@ function! s:commits(buffer_local, args)
let options.options[-1] .= ',ctrl-d'
endif
if !s:is_win
call extend(options.options,
\ ['--preview', 'grep -o "[a-f0-9]\{7,\}" <<< {} | xargs git show --format=format: --color=always | head -200'])
endif
return s:fzf(a:buffer_local ? 'bcommits' : 'commits', options, a:args)
endfunction