Implement -O and -p

remotes/github/pr/1
Marco Hinz 9 years ago
parent 2f35681794
commit 8e649507b3

16
nvr

@ -77,6 +77,14 @@ def parse_args():
action = 'append', action = 'append',
metavar = '<files>', metavar = '<files>',
help = 'open files via :split') help = 'open files via :split')
parser.add_argument('-O',
action = 'append',
metavar = '<files>',
help = 'open files via :vsplit')
parser.add_argument('-p',
action = 'append',
metavar = '<files>',
help = 'open files via :tabedit')
parser.add_argument('--remote', parser.add_argument('--remote',
action = 'append', action = 'append',
@ -144,6 +152,14 @@ def main():
for fname in args.o: for fname in args.o:
n.server.command('split {}'.format(fname.replace(" ", "\ ")), async=True) n.server.command('split {}'.format(fname.replace(" ", "\ ")), async=True)
if args.O and n.attached():
for fname in args.O:
n.server.command('vsplit {}'.format(fname.replace(" ", "\ ")), async=True)
if args.p and n.attached():
for fname in args.p:
n.server.command('tabedit {}'.format(fname.replace(" ", "\ ")), async=True)
# The following options exactly emulate their vim equivalents. # The following options exactly emulate their vim equivalents.
if args.remote_silent and n.attached(silent=True): if args.remote_silent and n.attached(silent=True):

Loading…
Cancel
Save