Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- " file ~/.vim/ftplugin/sh.vim
- function! RunBash()
- let s:current_file = expand("%")
- enew|silent execute ".!bash " . shellescape(s:current_file, 1)
- setlocal buftype=nofile bufhidden=wipe noswapfile nowrap
- endfunction
- nnoremap <Leader>c :call RunBash()<CR>
- " =======================================================
- " file ~/.vim/ftplugin/python.vim
- function! RunPython()
- let s:current_file = expand("%")
- enew|silent execute ".!python " . shellescape(s:current_file, 1)
- setlocal buftype=nofile bufhidden=wipe noswapfile nowrap
- endfunction
- nnoremap <Leader>c :call RunPython()<CR>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement