This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: Invoking Cygwin vim from Windows Explorer
- From: "Lavrentiev, Anton (NIH/NLM/NCBI) [C]" <lavr at ncbi dot nlm dot nih dot gov>
- To: carolus <worwor at bellsouth dot net>, "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Mon, 10 Feb 2014 16:14:43 +0000
- Subject: RE: Invoking Cygwin vim from Windows Explorer
- Authentication-results: sourceware.org; auth=none
- References: <ld6vd9$jnr$1 at ger dot gmane dot org> <1527769059 dot 20140209090943 at mtu-net dot ru> <ld81nr$im5$1 at ger dot gmane dot org> <832507782 dot 20140209183702 at mtu-net dot ru> <ld8cs9$789$1 at ger dot gmane dot org> <1935757972 dot 20140210000737 at mtu-net dot ru> <ld8s07$cie$1 at ger dot gmane dot org> <1917455121 dot 20140210021657 at mtu-net dot ru> <ld92t1$jr1$1 at ger dot gmane dot org> <1798057018 dot 20140210054916 at mtu-net dot ru> <ld9lfk$60b$1 at ger dot gmane dot org>
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
--
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