Invoking Cygwin vim from Windows Explorer
carolus
worwor@bellsouth.net
Mon Feb 10 17:41:00 GMT 2014
On 2/10/2014 10:14 AM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:
> My suggestion was not an exact recipe, it was just a scheme.
>
> Here the exact step-by-step procedure. I've checked it works on my Windows 7 box.
>
> From the Windows "Start" menu, in the Search box at the bottom
> (formerly called "Run") enter (substitute<YourUserName> with whatever
> ID you are going by on that Windows system):
>
> C:\Users\<YourUserName>\AppData\Roaming\Microsoft\Windows\SendTo
>
> In the opened Explorer window, right click on unoccupied space on the right hand
> pane, select "New"->"Shortcut".
>
> As prompted for "Location", enter (I assume your Cygwin installation is
> at C:\cygwin):
>
> C:\cygwin\bin\mintty.exe -e C:\cygwin\bin\bash.exe -l /bin/vim.sh
>
> click "Next", when prompted for the name, enter "Vim",
> close the dialog with "Finish".
>
> In Cygwin's window:
>
>> cd /bin
>> cat<<EOF
> #! /bin/sh
> exec vim -- "`cygpath -u $1`"
> EOF
>> chmod a+x vim.sh
>
> Now you can check whether it work by going to C:\cygwin\ in Windows
> Explorer, right-clicking Cygwin.bat, and using "Send To" with "Vim".
>
> HTH,
>
> Anton Lavrentiev
> Contractor NIH/NLM/NCBI
>
>
Now working correctly except that it requires an administrative password
to run mintty. The message looks like the one you get when installing
new software.
I think permissions on vim.sh are OK:
-rwxr-xr-x 1 cdr None 36 Feb 9 22:22 vim.sh*
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list