Wikia

Vim Tips Wiki

Changes: Fix system path for Vim launched from Windows 7 taskbar

Edit

Back to page

m (Fritzophrenic moved page Vim in Windows 7 "taskbar" to Fix system path for Vim launched from Windows 7 taskbar: more descriptive title without special characters)
(add categories)
 
Line 8: Line 8:
 
|version=7.0
 
|version=7.0
 
|subpage=/201111
 
|subpage=/201111
|category1=
+
|category1=Windows
|category2=
+
|category2=Cygwin
 
}}
 
}}
 
When using Cygwin and gvim invoked from a Windows 7 taskbar shortcut, Cygwin utilities are not executed within Vim.
 
When using Cygwin and gvim invoked from a Windows 7 taskbar shortcut, Cygwin utilities are not executed within Vim.

Latest revision as of 04:36, October 10, 2012

Recently created tip

We have not yet decided whether to keep this tip as its own page or merge it somewhere else. If you have a suggestion on the tip content, please edit this page or add your comments below (do not use the discussion page).

Please discuss whether to keep this as a new tip, or whether to merge it into an existing tip, on the new tips discussion page.
created November 16, 2011 · complexity basic · version 7.0

When using Cygwin and gvim invoked from a Windows 7 taskbar shortcut, Cygwin utilities are not executed within Vim.

For example:

:%!sort -k2,2

results in the buffer being replaced with "-k2,2 not found". That is, the Windows sort command was executed instead of the Cygwin (gnu) sort. This is despite the fact that C:\cygwin\bin is at the beginning of the PATH environment variable.

If you open a command prompt window and start gvim from the command line, the Cygwin sort is executed properly.

A fix is to change the "Start in" box in the taskbar shortcut properties to something non blank. For example, change the "Start In" box to "C:\Users\fred\Documents". Thereafter, Cygwin executables will be found if you start Vim from the taskbar shortcut.

CommentsEdit

Around Wikia's network

Random Wiki