This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Invoking Cygwin vim from Windows Explorer


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]