Created
September 13, 2023 19:08
-
-
Save fprimex/09743a03601d5b3ec1f66ebb6312be06 to your computer and use it in GitHub Desktop.
vimrc bits to send buffer to interpreters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Send the current buffer's complete path to various interpreters | |
" \[letter] - non-interactive execution | |
" \[shift+letter] - execute, then run interactive shell | |
noremap <leader>p :!clear && python %:p \| less<CR><CR> | |
noremap <leader>P :!clear && python -i %:p<CR> | |
"noremap <leader>P :!clear && ipython -i %:p<CR><CR> | |
noremap <leader>a :new \| r !clear && awk -f %:p input.txt | |
noremap <leader>o :!clear && octave -q %:p \| less<CR><CR> | |
noremap <leader>O :!clear && octave -q --persist --eval "source('%:p')"<CR> | |
noremap <leader>r :!clear && R -q --no-save --no-restore-data < %:p \| less<CR><CR> | |
noremap <leader>R :!clear && R -q --save --no-restore-data < %:p && R -q --no-save<CR><CR> | |
noremap <leader>g :!clear && gnuplot -e "set terminal png truecolor size 800,600 font '/Library/Fonts/Arial.ttf'; set output '$(expr %:p : '\(.*\)\..*').png'" %:p<CR><CR> | |
noremap <leader>G :!clear && gnuplot %:p -<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment