From e7a82e91c3268288d757aa7fdf6c8d59ca89c9e9 Mon Sep 17 00:00:00 2001 From: Prabir Shrestha Date: Sun, 23 Dec 2018 14:54:07 -0800 Subject: [PATCH] do not open unnecessary extra buffer in vim8 --- plugin/split-term.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugin/split-term.vim b/plugin/split-term.vim index 6eab3bb..d4d1944 100644 --- a/plugin/split-term.vim +++ b/plugin/split-term.vim @@ -75,7 +75,12 @@ fun! s:openTerm(args) exe 'set shell =' . s:default_shell endif - exe 'terminal' a:args + if has('nvim') + exe 'terminal' a:args + else + exe 'terminal ++curwin' a:args + endif + exe 'startinsert' if s:map_keys call s:defineMaps()