From 121bd70fcf6e3ad342ef025167daf199bbbe1bee Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 8 Oct 2017 03:44:28 +0900 Subject: [PATCH] [[B]Commits] Enable preview window by default Close #461 --- autoload/fzf/vim.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/autoload/fzf/vim.vim b/autoload/fzf/vim.vim index 79164ff..2eb2c09 100644 --- a/autoload/fzf/vim.vim +++ b/autoload/fzf/vim.vim @@ -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