[vim] Bind Ctrl-J in Vim terminal to fix enter key

Temporary workaround for non-Windows environment

Reference:
https://github.com/vim/vim/issues/1998
https://github.com/junegunn/fzf/pull/1019#issuecomment-327008348
This commit is contained in:
Jan Edmund Lazo 2017-09-05 00:15:30 -04:00 committed by Junegunn Choi
parent fd6bc7308f
commit 26d7896877

View File

@ -400,6 +400,9 @@ try
let optstr .= ' --height='.height let optstr .= ' --height='.height
elseif use_term elseif use_term
let optstr .= ' --no-height' let optstr .= ' --no-height'
if !has('nvim') && !s:is_win
let optstr .= ' --bind ctrl-j:accept'
endif
endif endif
let command = prefix.(use_tmux ? s:fzf_tmux(dict) : fzf_exec).' '.optstr.' > '.temps.result let command = prefix.(use_tmux ? s:fzf_tmux(dict) : fzf_exec).' '.optstr.' > '.temps.result