-
-
Couldn't load subscription status.
- Fork 5.9k
Use ShellExecute in !start #1570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
On 3/18/2017 3:34 AM, Katsuya Hino (Vim Github Repository) wrote:
ShellExecute Win32 API enables |:!start <filename>| open a file with
default app.
For example, |:!start index.html| make the default browser open index.html.
------------------------------------------------------------------------
Here's what I have been using:
nnoremap \ie :silent !start "c:\program files\internet
explorer\iexplore.exe" -nohome <cWORD><CR>
nnoremap \x :silent !start rundll32 url.dll,FileProtocolHandler
<cWORD>
nnoremap \xp :silent !start rundll32 url.dll,FileProtocolHandler
%:p:h/<cWORD>
…
You can view, comment on, or merge this pull request online at:
#1570
Commit Summary
* Use ShellExecute in !start
File Changes
* *M* src/os_win32.c
<https://github.com/vim/vim/pull/1570/files#diff-0> (26)
Patch Links:
* https://github.com/vim/vim/pull/1570.patch
* https://github.com/vim/vim/pull/1570.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1570>
--
--
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to ***@***.***
***@***.***>.
For more options, visit https://groups.google.com/d/optout.
|
|
Can you please write something for the help file, to explain users how this works? Ideally we would also have a test. But that might not be so easy. |
and won't the proposed patch break the above -- more general and expected -- functionality? How can Vim take over a Windows' command name and apply it to a narrower use? |
ShellExecute Win32 API enables `:!start <filename>` open a file with default app. For example, `:!start index.html` make the default browser open index.html.
0f4cb1d to
8fce03f
Compare
|
I have added examples of This patch will improve compatibility of Current Vim's On the other hand, This patch does not break current |
|
The expectation is that anything after Likewise Unfortunately, Vim has I believe Vim should never have provided a special meaning to |
|
I agree with your believe, but changing or removing The problem that we should discuss here is that current The objection of this patch is to solve the problem, not to add any new feature or change current |
Problem: On MS-Windows ":!start" does not work as expected.
Solution: When creating a process fails try passing the argument to
ShellExecute(). (Katsuya Hino, closes vim#1570)
Problem: On MS-Windows ":!start" does not work as expected.
Solution: When creating a process fails try passing the argument to
ShellExecute(). (Katsuya Hino, closes vim#1570)
Problem: On MS-Windows ":!start" does not work as expected.
Solution: When creating a process fails try passing the argument to
ShellExecute(). (Katsuya Hino, closes vim#1570)
ShellExecute Win32 API enables
:!start <filename>open a file with default app.For example,
:!start index.htmlmake the default browser open index.html.