Avoid Windows command prompt popups when possible.

Before this commit some Windows users saw the command prompt pop
up briefly, and/or the taskbar flicker, every time the plugin ran.

Now the plugin will use xolox's vim-shell and vim-misc, if they are
available and we are on Windows, to execute external commands.  Xolox's
clever plugins avoid the command prompt popup and taskbar flicker.

Windows users with those plugins installed can opt out by setting a
variable in their vimrc.

Many thanks to @suxpert for the initial code.
This commit is contained in:
Andy Stewart
2014-06-19 10:45:40 +02:00
parent 7ac9d059f8
commit a2aa2b1100
5 changed files with 47 additions and 7 deletions

View File

@@ -48,6 +48,8 @@ Add `Plugin 'airblade/vim-gitgutter'` to your `~/.vimrc` and then:
* either within Vim: `:PluginInstall`
* or in your shell: `vim +PluginInstall +qall`
If you are on Windows you may find the command prompt pops up briefly every time vim-gitgutter runs. You can avoid this by installing both [vim-misc](https://github.com/xolox/vim-misc) and [vim-shell](https://github.com/xolox/vim-shell). If you have those two plugins but don't want vim-gitgutter to use them, you can opt out with `let g:gitgutter_avoid_cmd_prompt_on_windows = 0` in your `~/.vimrc`.
### Usage