how can i run cygwin from vim

113 Views Asked by At

The prover of TLA requires Cygwin, I want to run it (tlapm.exe for example) in Gvim, How can I start cygwin from a vimscript program

In the TLA toolbox, eval it as follows:

/usr/local/bin/tlapm --toolbox 21 21 --isaprove -I C:\cygwin\usr\local\lib\tlaps\ C:\tla\Channel.tla
1

There are 1 best solutions below

0
On

You can invoke other executables from Vimscript with :! cmd or call system(cmd). To run a Cygwin binary, you can invoke the command through the Cygwin Bash:

:echo system('C:\cygwin\bin\bash -c "/usr/local/bin/tlapm --toolbox 21 21 --isaprove -I C:\cygwin\usr\local\lib\tlaps\ C:\tla\Channel.tla"')

or even directly (C:\cygwin\bin\tlapm). Note that the C:\cygwin\... arguments are better written in Cygwin path notation; the backslashes may need escaping or cause problems.