diff --git a/plugin/repl.vim b/plugin/repl.vim index 3e9de7c..e0ea674 100644 --- a/plugin/repl.vim +++ b/plugin/repl.vim @@ -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 i :Repl