Implement g:repl_split_command
This commit is contained in:
parent
64bc624fb0
commit
60e7659efe
@ -46,8 +46,9 @@ function! repl#erlang#open_repl() abort
|
|||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
let l:args = printf('%s %s %s', l:repl, l:opt, l:module_file)
|
let l:args = printf('%s %s %s', l:repl, l:opt, l:module_file)
|
||||||
|
let l:vimshell_interactive = ':VimShellInteractive' . printf("--split='%s'", g:repl_split_command)
|
||||||
|
|
||||||
execute ':VimShellInteractive' l:args
|
execute l:vimshell_interactive l:args
|
||||||
call vimshell#interactive#send(printf('c(%s).', fnamemodify(l:module_file, ':t:r')))
|
call vimshell#interactive#send(printf('c(%s).', fnamemodify(l:module_file, ':t:r')))
|
||||||
execute 'cd' l:pwd
|
execute 'cd' l:pwd
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -17,5 +17,6 @@ function! repl#haskell#open_repl() abort
|
|||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
let l:args = printf('%s %s %s', l:repl, l:opt, l:module_file)
|
let l:args = printf('%s %s %s', l:repl, l:opt, l:module_file)
|
||||||
execute ':VimShellInteractive' l:args
|
let l:vimshell_interactive = ':VimShellInteractive' . printf("--split='%s'", g:repl_split_command)
|
||||||
|
execute l:vimshell_interactive l:args
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -17,5 +17,6 @@ function! repl#python#open_repl() abort
|
|||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
let l:args = printf('%s %s %s', l:repl, l:opt, l:module_file)
|
let l:args = printf('%s %s %s', l:repl, l:opt, l:module_file)
|
||||||
execute ':VimShellInteractive' l:args
|
let l:vimshell_interactive = ':VimShellInteractive' . printf("--split='%s'", g:repl_split_command)
|
||||||
|
execute l:vimshell_interactive l:args
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -16,5 +16,6 @@ function! repl#ruby#open_repl() abort
|
|||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
let l:args = printf('%s %s %s', l:repl, l:opt, l:module_file)
|
let l:args = printf('%s %s %s', l:repl, l:opt, l:module_file)
|
||||||
execute ':VimShellInteractive' l:args
|
let l:vimshell_interactive = ':VimShellInteractive' . printf("--split='%s'", g:repl_split_command)
|
||||||
|
execute l:vimshell_interactive l:args
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -5,7 +5,7 @@ endif
|
|||||||
let g:loaded_repl_vim = 1
|
let g:loaded_repl_vim = 1
|
||||||
let s:save_cpo = &cpo
|
let s:save_cpo = &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
"#--- --- ---#"
|
"-------------------"
|
||||||
|
|
||||||
let g:repl#default_filetype_repl = {
|
let g:repl#default_filetype_repl = {
|
||||||
\ 'haskell' : {
|
\ 'haskell' : {
|
||||||
@ -26,6 +26,9 @@ let g:repl#default_filetype_repl = {
|
|||||||
\ }
|
\ }
|
||||||
\}
|
\}
|
||||||
|
|
||||||
|
" 'split' or 'vertical split'
|
||||||
|
let g:repl_split_command = get(g:, 'repl_split_command', 'split')
|
||||||
|
|
||||||
command! -bar -nargs=0 Repl call repl#run_repl()
|
command! -bar -nargs=0 Repl call repl#run_repl()
|
||||||
nnoremap <silent> <Plug>(repl-run) :<C-u>call repl#run_repl()<CR>
|
nnoremap <silent> <Plug>(repl-run) :<C-u>call repl#run_repl()<CR>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user