commit
99bbb6f2e8
@ -9,6 +9,8 @@ function! Repl()
|
||||
call ReplPython()
|
||||
elseif &filetype == 'scala'
|
||||
call ReplScala()
|
||||
elseif &filetype == 'clojure'
|
||||
call ReplClojure()
|
||||
endif
|
||||
endfunction
|
||||
|
||||
@ -70,6 +72,15 @@ function! ReplScala()
|
||||
\ { 'is_interactive' : 0, 'is_single_command' : 1 })
|
||||
let b:interactive.is_close_immediately = 1
|
||||
endfunction
|
||||
|
||||
function! ReplClojure()
|
||||
let l:currentFile = expand('%')
|
||||
let l:args = 'clj -i ' . l:currentFile . ' -r'
|
||||
call vimshell#execute_internal_command(
|
||||
\ 'iexe', vimproc#parser#split_args(l:args), { 'stdin' : '', 'stdout' : '', 'stderr' : '' },
|
||||
\ { 'is_interactive' : 0, 'is_single_command' : 1 })
|
||||
let b:interactive.is_close_immediately = 1
|
||||
endfunction
|
||||
|
||||
command! -nargs=0 Repl call Repl()
|
||||
nnoremap <Space>i :<C-u>Repl<Cr>
|
||||
|
Reference in New Issue
Block a user