This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
repl.vim/plugin/repl.vim
aiya000 c0ff29aeeb Add g:repl_no_default_keymappings
Enable <leader>i to :Repl
2015-12-23 14:54:02 +09:00

46 lines
940 B
VimL

scriptencoding utf-8
if exists('g:loaded_repl_vim')
finish
endif
let g:loaded_repl_vim = 1
let s:save_cpo = &cpo
set cpo&vim
"-------------------"
" If didn't define g:repl_filetype_repl, repl.vim use this
let g:repl#default_filetype_repl = {
\ 'haskell' : {
\ 'repl' : 'ghci',
\ 'opt' : ''
\ },
\ 'ruby' : {
\ 'repl' : 'irb',
\ 'opt' : '--simple-prompt -r'
\ },
\ 'python' : {
\ 'repl' : 'python',
\ 'opt' : '-i'
\ },
\ 'erlang' : {
\ 'repl' : 'erl',
\ 'opt' : ''
\ }
\}
" 'split' or 'vertical split'
let g:repl_split_command = get(g:, 'repl_split_command', 'split')
command! -bar -nargs=0 Repl call repl#run_repl()
nnoremap <silent> <Plug>(repl-run) :<C-u>call repl#run_repl()<CR>
"-------------------"
" Define default keymappings
if !exists('g:repl_no_default_keymappings') || !g:repl_no_default_keymappings
nmap <leader>i <Plug>(repl-run)
endif
"-------------------"
let &cpo = s:save_cpo
unlet s:save_cpo