On Tuesday, August 6, 2013 11:02:12 AM UTC-4, Paul wrote: > I use both the PC-based [g]vim and cygwin's [g]vim. There are many > times when I need the behaviour of PC vim, but I also want to bang > out to bash. With help from this forum and much trial and error, I > found that the following is a robust way to allow this: > > let &shell='set HOME=c:\cygwin\home\' . $USERNAME . > \ '& c:\cygwin\bin\bash.exe -i' > > This fails when I bang out to unix's arithmetic interpreter 'bc' > from files that have ff=dos, which applies to most file that I work > on. I simply set ff=unix temporarily. I can avoid this by writing > a wrapper around bc or bash (not that I will find the time to > robustify such a solution any time soon), but I was wondering if > there is a simpler way to do this? I tried the following, but it > generates "E485: Can't read file > c:/Users/$USER/AppDAta/Local/Temp/1/VIoEED3.tmp". > > let &shell='set HOME=c:\cygwin\home\' . $USERNAME . > \ '& C:\cygwin\bin\dos2unixe.exe | ' . > \ c:\cygwin\bin\bash.exe -i'
OK, I have 2 nonideal solutions. The first is a 1-line script wrapper around bc: dosbc: ------ #!/bin/bash -i dos2unix | bc The second is to use the open source math package Octave, which doesn't seem to trip over the DOS line endings. To bang out from vim, however, I need to suppress the splash message and complaints about X11 not being set up: alias octxt='octave --no-window-system --silent' -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
