def OpenFilename(filename, options={}):
 command = GetVimCommand(options.get(u'command', u'horizontal-split'), u'horizontal-split')
 size = (options.get(u'size', u'') if (command in [u'split', u'vsplit']) else u'')
 focus = options.get(u'focus', False)
 if ((not focus) and (command == u'tabedit')):
  previous_tab = GetIntValue(u'tabpagenr()')
 else:
  previous_tab = None
 try:
  vim.command(u'{0}{1} {2}'.format(size, command, filename))
 except vim.error as e:
  if (u'E325' not in str(e)):
   raise
  if (filename != GetCurrentBufferFilepath()):
   return
 except KeyboardInterrupt:
  return
 _SetUpLoadedBuffer(command, filename, options.get(u'fix', False), options.get(u'position', u'start'), options.get(u'watch', False))
 if (not focus):
  if (command == u'tabedit'):
   JumpToTab(previous_tab)
  if (command in [u'split', u'vsplit']):
   JumpToPreviousWindow()

def OpenFilename ( filename , options = { } ) : command = GetVimCommand ( options . get ( u'command' , u'horizontal-split' ) , u'horizontal-split' ) size = ( options . get ( u'size' , u'' ) if ( command in [ u'split' , u'vsplit' ] ) else u'' ) focus = options . get ( u'focus' , False ) if ( ( not focus ) and ( command == u'tabedit' ) ) : previous_tab = GetIntValue ( u'tabpagenr()' ) else : previous_tab = None try : vim . command ( u'{0}{1} {2}' . format ( size , command , filename ) ) except vim . error as e : if ( u'E325' not in str ( e ) ) : raise if ( filename != GetCurrentBufferFilepath ( ) ) : return except KeyboardInterrupt : return _SetUpLoadedBuffer ( command , filename , options . get ( u'fix' , False ) , options . get ( u'position' , u'start' ) , options . get ( u'watch' , False ) ) if ( not focus ) : if ( command == u'tabedit' ) : JumpToTab ( previous_tab ) if ( command in [ u'split' , u'vsplit' ] ) : JumpToPreviousWindow ( )
open a file in vim .