def do_motion(self, words): if not words[-1].isdigit(): words.append('1') select_default = 's' if words[0] not in atomutils.ACTIONS: select_default = 'm' api.send_string(self.activate + select_default + atomutils.MOTIONS[words[-2]] + words[-1] + '!') atomutils.do_action(words[0])
def multiple_lines(self, words): api.send_string('{}m{}{}!'.format(self.activate, atomutils.SIMPLE['line'], str(int(words[1])))) api.send_string('{ctrl+l}') api.send_string('{}s{}{}!'.format(self.activate, atomutils.SIMPLE['line'], words[-1])) api.send_string('{ctrl+l}') atomutils.do_action(words[0])
def line_action(self, words): api.send_string('{ctrl+l}') atomutils.do_action(words[0])
def single_word(self, words): api.send_string('{ctrl+d}') atomutils.do_action(words[0])
def single_line(self, words): api.send_string('{}m{}{}!'.format(self.activate, atomutils.SIMPLE['line'], words[-1])) if words[0] not in ['beer', 'line']: api.send_string('{ctrl+l}') atomutils.do_action(words[0])
def modify_function(self, words): api.send_string(au.OTHER['select{}'.format(words[-1].title())]) au.do_action(words[0])