[download]

local/bin/gvim

   1 #!/bin/bash
   2 #         ░███████
   3 #       ░███████       D O T F I L E S
   4 #       ░███████       G V I M
   5 #    ░█████████████
   6 #       ░███████
   7 #       ░███████       LGPL <http://www.gnu.org/licenses/>
   8 #       ░██  ░██
   9 #       ░██  ░██   (C) 2019-2020 Alexey Gagin <http://www.lexa.by/dotfiles/>
  10 
  11 at=($(< ~/.vim/vimpid) gvim)
  12 ls=$(vim --serverlist | grep -ic $at)
  13 
  14 [[ $1    == -f ]] && shift
  15 [[ $#$ls == 00 ]] || rt=-tab
  16 
  17 vim -g --servername $at ${@:+--remote$rt-silent "$@"}