Running gvim in the background by default

I am constantly running gvim from the bash prompt within Cygwin, and loosing control of my session. I’d have to quit gvim, and restart it in the background.
Finally got around to fixing that. Put this in your .bashrc:

function gvimBackground() {
/cygdrive/C/Program\ Files/Vim/vim72/gvim.exe $@ &
alias gvim=gvimBackground
alias vi=gvim
alias vim=gvim

2 thoughts on “Running gvim in the background by default”

  1. First thing I’d try is create a small shell script in your home directory that contains the contents of the function, make it executable, and then create aliases to that in the .cshrc file.

Leave a Reply

Your email address will not be published.