SamuelDSR
SamuelDSR

Reputation: 28

Change the relative order with which gvim search for executable files

Gvim will search the executable files in $PATH, $VIMRUNTIME(the folder where gvim.exe locate) and the current folder. The folder of $PATH have the highest priority. Suppose i place a cygwin version “find.exe" in the folder where gvim.exe locate. and i want gvim to call this cygwin version of "find.exe" instead of the windows version of "find.exe" for ":!find", how could i do?

Upvotes: 0

Views: 153

Answers (2)

Ingo Karkat
Ingo Karkat

Reputation: 172698

You can modify $PATH in your ~/.vimrc; this will avoid messing with any other Windows program (well, except for those that are launched from inside Vim - do check their compatibility).

:let $PATH = 'C:\cygwin\bin;' . $PATH

If other Cygwin binaries still interfere, copy Cygwin's find.exe to another folder (be it $VIMRUNTIME or a fresh directory somewhere else), and prepend that to $PATH.

:let $PATH = $VIMRUNTIME . ';' . $PATH

Upvotes: 1

Tom
Tom

Reputation: 16198

If you put C:\cygwin\bin (or your equivalent) at the start of your $PATH it will find the cygwin binary first and use that one rather than the windows binary.

Upvotes: 1

Related Questions