Thursday, April 28, 2011

Re: execute command from vim in windows

thanks for the help

On Wed, Apr 27, 2011 at 8:53 PM, Ben Schmidt <mail_ben_schmidt@yahoo.com.au> wrote:
On 28/04/11 3:39 AM, cyboman wrote:
i need to run an executable from vim. the problem that i'm facing is
that directory names in the path to this file contain spaces and vim
doesn't recognize that.

here is the problem
C:\Documents and Settings\myhomedirectory\someotherdirectory
\executable.exe

when i execute from vim
!C:\\Documents\ and\ Settings\\myhomedirectory\\someotherdirectory\
\executable.exe

i get the following message

C:\\Documents

I wonder what happened to the rest of the message.

Anyway...

I think it's because Vim basically passes the commandline to cmd.exe
which doesn't understand backslash escapes. Try enclosing in double
quotes instead.

!"C:\\Documents and Settings\\home\\otherdir\\executable.exe"

Not sure about doubling the backslashes, but I think it's
'optional'--but maybe it would work better without, so if the above
doesn't work, maybe try single backslashes.

Ben.




--
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

No comments: