From 26d7896877641a229da00c2a33aeae1f8fd1da13 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 5 Sep 2017 00:15:30 -0400 Subject: [PATCH] [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 --- plugin/fzf.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugin/fzf.vim b/plugin/fzf.vim index 1ffb45b..d90694a 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -400,6 +400,9 @@ try let optstr .= ' --height='.height elseif use_term let optstr .= ' --no-height' + if !has('nvim') && !s:is_win + let optstr .= ' --bind ctrl-j:accept' + endif endif let command = prefix.(use_tmux ? s:fzf_tmux(dict) : fzf_exec).' '.optstr.' > '.temps.result