From 228662596986bb9364552dc3b88e02bde556a903 Mon Sep 17 00:00:00 2001 From: iaalm Date: Tue, 5 Dec 2023 12:06:22 +0800 Subject: [PATCH] nvim to behavior as vim to always open shell in split --- autoload/terminal_drawer.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/autoload/terminal_drawer.vim b/autoload/terminal_drawer.vim index 28eddcc..b8c5feb 100644 --- a/autoload/terminal_drawer.vim +++ b/autoload/terminal_drawer.vim @@ -17,7 +17,11 @@ function terminal_drawer#ToggleTerminal() abort else " no terminal buffer, create one let l:cmd = get(g:, 'terminal_drawer_shell', '') - execute 'term ' . l:cmd + if has('nvim') + execute ':sp term://' . l:cmd + else + execute 'term ' . l:cmd + endif endif endfunction