def do(view): if txmt: return for cmd, args in loadsj(query.get('commands', '[]')): if window: if DEBUG: # Formatted like sublime.log_commands(True) print 'command: %s' % encode_for_command_line(cmd, args) # Bug: command can't be unicode window.run_command(cmd.encode('utf8'), args) ################################################################################
def do(view): if txmt: return runners = {'cmd': view, 'wcmd': window} for cmd_type, cmd in cmds: cmd, args = loadsj(cmd) runner = runners.get(cmd_type) if runner: if DEBUG: # Formatted like sublime.log_commands(True) print 'command: %s' % encode_for_command_line(cmd, args) # Bug: command can't be unicode runner.run_command(cmd.encode('utf8'), args) ################################################################################
def do(view): if txmt: return runners = {'cmd': view, 'wcmd': window} for cmd_type, cmd in cmds: cmd, args = loadsj(cmd) runner = runners.get(cmd_type) if runner: if DEBUG: # Formatted like sublime.log_commands(True) print 'command: %s' % encode_for_command_line( cmd, args) # Bug: command can't be unicode runner.run_command(cmd.encode('utf8'), args) ################################################################################