Merge pull request #2 from roman/master

(thanks! 'roman)
This commit is contained in:
ujihisa 2011-07-08 08:24:00 -07:00
commit 99bbb6f2e8

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>