Fandom

Vim Tips Wiki

Fix system path for Vim launched from Windows 7 taskbar

Redirected from Vim in Windows 7 "taskbar"

1,624pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Proposed tip Please edit this page to improve it, or add your comments below (do not use the discussion page).

Please use new tips to discuss whether this page should be a permanent tip, or whether it should be merged to an existing tip.
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

Also on Fandom

Random Wiki