When using Cygwin and gvim invoked from a Windows 7 taskbar shortcut, Cygwin utilities are not executed within Vim.
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.