![getting macvim getting macvim](http://onebigfunction.com/img/2015/01/15/adding-color-scheme-vim.png)
# But if you use open instead, you will need to fully qualify the # Note: this isn't perfect, because any error output goes to the
![getting macvim getting macvim](https://jeanstree515.weebly.com/uploads/1/2/6/7/126787747/781170181.jpg)
# etc., but not when it is invoked as "vim -g". # not we work around this when this script is invoked as "gvim" or "rgview" # The program should fork by default when started in GUI mode, but it does So we replace that command (originally on line 69): # Last step: fire up vim. We also need to modify the command that starts MacVim to handle our different modes, etc.
![getting macvim getting macvim](https://i.stack.imgur.com/t7ZX4.png)
We look for -d (diff mode) and – (stdin) separate from other arguments. This is a pretty normal bash argument getting loop. At Line 60 we add the following: # Add new flags for different modes Well, first we add some extra command line options parsing to detect if we’re in diff mode, if we’re using stdin, and to preserve options for passing back into MacVim later.