tpope/vim-sensible — pull request #65 by darcyparker (2013-12-06 23:22:14+00:00)
Title: On windows, change `&shell` to `$COMSPEC` if win32/64 vim.exe or gvim.exe is executed from inside bash

Please consider this as an addition for vim-sensible.

Unfortunately many plugins assume that if `has("win32") || has("win64") || has("win16")` is true, then shell commands are being executed in `cmd.exe`.

Note: `$COMSPEC` is the full path to `cmd.exe`.

If you launch a native windows gvim.exe (win32 or win64) (not cygwin gvim binary) from inside a cygwin bash shell, then `&shell` is `/bin/bash`. This causes various problems with plugins. For a windows binary of gvim.exe, it is best to have &shell=$COMSPEC.

Bash is great... but cygwin users should use cygwin's vim if they desire to use bash as their &shell.

Native windows gvim.exe is often preferred over cygwin gvim because it doesn't require xwindows server. So it is common to execute native windows gvim.exe from inside cygwin. Hence the need for this addition to vim-sensible.