summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Edmund Lazo <janedmundlazo@hotmail.com>2017-09-05 00:15:30 -0400
committerJunegunn Choi <junegunn.c@gmail.com>2017-09-05 13:29:46 +0900
commit26d7896877641a229da00c2a33aeae1f8fd1da13 (patch)
treea6de740bfbe042242effbfedd521190a4b2494b0
parentfd6bc7308f4109a96ff05715434f60574d1e7670 (diff)
[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
-rw-r--r--plugin/fzf.vim3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index 1ffb45b2..d90694af 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