Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 31 lines (24 sloc) 0.646 kb
#! /bin/sh
# Use existing vim sessions to open new files, if at all possible. This is a
# much nicer way to work than heaps of gvim windows, opening everything with :e
# or having to manual specify all the --remote stuff.
SERVERNAME=GVIM
base=${0##*/}
editor=${base%-client}
# If it looks like we're passing in options, just call the editor directly.
if [ "${1::1}" == "-" ]
then
exec ${editor} $@
fi
if [ "${editor}" == "vim" ]
then
flags="--remote-wait"
else
flags="--remote"
fi
if $(${editor} --serverlist | grep -q ${SERVERNAME})
then
exec ${editor} --servername ${SERVERNAME} ${flags} $@
else
exec ${editor} $@
fi
Jump to Line
Something went wrong with that request. Please try again.