Tip #1388: Vim and ocaml interpreter
tip karma |
Rating 1/3, Viewed by 577
|
created: |
|
November 15, 2006 12:35 |
|
complexity: |
|
basic |
author: |
|
setog |
|
as of Vim: |
|
|
I try to learn ocaml, and I add this lines in my .vimrc to run the code in the ocaml interpreter :
set sb
map <f11> :split /tmp/ocaml \| %d \|setlocal ft=omlet \| setlocal autowrite \| r!ocaml < # <CR>
map <f12> :dr /tmp/ocaml \| %d \|setlocal ft=omlet \|setlocal autowrite \| r!ocaml < # <CR>
--
the first map <f11> , open a temp file in a split and write the output in it (with omlet syntax)
I use the second (<f12>) to do it if I have allready a split with the result.
Soif you know a better way to do the same things please write it :D
I do a set autowrite.. but I am sure we can use the same property of :he command (a buffer in read only without needing to save it)
please comment
thx
<<Standard editing shotcuts |
Trailing white space aware Delete Key (Insert Mode) >>
Additional Notes
|