Adding support for clojure

This commit is contained in:
Roman Gonzalez 2011-07-08 00:30:10 -07:00
parent c4bec3236c
commit b4cc2de8d2

View File

@ -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>