Skip to content

Instantly share code, notes, and snippets.

@wonderbeyond
Last active August 29, 2015 14:07
Show Gist options
  • Select an option

  • Save wonderbeyond/e0e27935d5d2c31f70ec to your computer and use it in GitHub Desktop.

Select an option

Save wonderbeyond/e0e27935d5d2c31f70ec to your computer and use it in GitHub Desktop.
#!/bin/bash
#使用vim打开文件时, 可以简单指定Vim服务器
VIM=gvim
server=${s-GVIM}
args="--servername ${server}"
[[ "$#" != 0 && `$VIM --serverlist` == *${server^^}* ]] && \
args="$args --remote-tab"
$VIM -f ${args} "$@" &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment