From b4cc2de8d22e802c2b3cbbe2a8752fb9796dd113 Mon Sep 17 00:00:00 2001 From: Roman Gonzalez Date: Fri, 8 Jul 2011 00:30:10 -0700 Subject: [PATCH] Adding support for clojure --- plugin/repl.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) 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