I want gvim to always open in a separate window and return the command prompt immediately. In other words I want
gvim filename
to be the same as
gvim filename &
it seems like I should be able to do this with an alias. Is there a special wildcard character for aliases? Something like:
alias gvim="gvim <wildcard> &"
Where "wildcard" would be replaced by whatever text comes after gvim on the command line.
I also tried:
function gvim()
{
"/cygdrive/c/program files (x86)/vim/vim72/gvim.exe" "$@" "&" ;
}
But it only opens gvim and doesn't return the prompt like I want it to.
If someone could point me in the right direction, it would greatly improve my understanding of how .bashrc works.
Thanks!
-Derek
UPDATE: I got it to work by getting rid of the quotation marks around the & and the semicolon at the end:
function gvim()
{
"/cygdrive/c/program files (x86)/vim/vim72/gvim.exe" "$@" &
}