[raw] [dotfiles.tar.gz]
   1 #!/bin/bash
   2 
   3 rt=--remote
   4 vi=/usr/bin/gvim
   5 at=$(< ~/.vim/vimpid)
   6 at=${at:-gvim}
   7 
   8 [[ $1 == -f ]] && shift
   9 [[ -f /usr/local/bin/gvim ]] && vi=/usr/local/bin/gvim
  10 [[ $# > 1 || $($vi --serverlist | grep -i $at) ]] && rt+=-tab
  11 
  12 $vi --servername $at ${@:+$rt-silent "$@"}