Add an option to autoclose the runner

fix-tmux-next-3dot4
Michael van der Kamp 3 years ago
parent 5b1791673c
commit 54d24d1694

@ -15,6 +15,7 @@ let g:VimuxRunnerType = get(g:, 'VimuxRunnerType', 'pane')
let g:VimuxTmuxCommand = get(g:, 'VimuxTmuxCommand', 'tmux')
let g:VimuxUseNearest = get(g:, 'VimuxUseNearest', v:true)
let g:VimuxExpandCommand = get(g:, 'VimuxExpandCommand', v:false)
let g:VimuxCloseOnExit = get(g:, 'VimuxCloseOnExit', v:false)
function! VimuxOption(name) abort
return get(b:, a:name, get(g:, a:name))
@ -39,6 +40,13 @@ command -bar VimuxClearTerminalScreen :call VimuxClearTerminalScreen()
command -bar VimuxClearRunnerHistory :call VimuxClearRunnerHistory()
command -bar VimuxTogglePane :call VimuxTogglePane()
if VimuxOption('VimuxCloseOnExit')
augroup VimuxAutocloseCommands
au!
autocmd VimLeave * call VimuxCloseRunner()
augroup END
endif
function! VimuxRunCommandInDir(command, useFile)
let l:file = ''
if a:useFile ==# 1

Loading…
Cancel
Save