[download]

local/bin/gvim

   1 #!/bin/bash
   2 
   3 sid=$({ cat ~/.vim/vimsid 2>&-; vim --serverlist; } |
   4 sort | uniq -ic | sort -r | awk '{ print $2; exit }')
   5 
   6 [[ $1 == -f ]] && shift
   7 [[ $# == 0  ]] && sid=
   8 
   9 vim -g ${sid:+--servername} $sid ${@:+--remote-tab-silent} "$@"