Open and execute a file in the SML interpreter from Vim

I have been using vim for editing code for some time, and now I want to use it effectively for programming in standard ML. In emacs, you can use the sml mode, which allows you to open the SML-intepreter (Moscow ML in my case) in the buffer and load the actual file.

Is it possible to start the Moscow ML interpreter and load the actual file from vim?

+6
source share
1 answer

What I do, I have a set of commands :make to run the file in Moscow ML. This can be done by adding the following to your .vimrc :

 " SML make code {{{ autocmd FileType sml setlocal makeprg=rlwrap\ mosml\ -P\ full\ '%' " }}} 

Then you simply type :make in the SML buffer and run the code through Moscow ML for you. ( rlwrap improves the REPL bit by expanding it with readline functions.)

+4
source

Source: https://habr.com/ru/post/925483/


All Articles