'www.google.com' is not an html string, it's a host name. It's likely
been interpreted as a URL when you tried that command because things
like '%20' are escape sequence for encoding special characters in a URL,
not terminal instructions.

To me it is a string, that happens to describe a URL. I like the mapping, because, in principle, it should also execute a ``string'' like [email protected] by launching my default email client. That is, I want vim to just pass the string to the shell command, without interpretation, and let the shell interpret the string and launch an appropriate application.

What happens when I execute:

:silent !start rundll32 url.dll,FileProtocolHandler <cWORD> <CR> ^M

with the cursor on http://www.google.com or www.google.com is that
strings like %20 appear too fast to capture, and then I get this error message:

        http://guide.opendns.com/main?url=www.google.com+%3Ccr%3E

        You tried to visit www.google.com, which is not loading.

Yet when I simply enter www.google.com in the windows Run dialogue, chrome loads the google web page, no problem. Likewise if enter this on a cmd line:

rundll32 url.dll,FileProtocolHandler www.google.com <ENTER>

So is vim interpreting my ``string'' as a url and adding extra characters?
If so, how to I get vim just to pass www.google.com to cmd.exe, without interpreting it? I tried using <cword> but my browser did not launch. Im not sure what the difference is between <cWORD> and <cword>

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

Reply via email to