Пример #1
0
 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])
Пример #2
0
 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])
Пример #3
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])
Пример #4
0
 def line_action(self, words):
     api.send_string('{ctrl+l}')
     atomutils.do_action(words[0])
Пример #5
0
 def single_word(self, words):
     api.send_string('{ctrl+d}')
     atomutils.do_action(words[0])
Пример #6
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])
Пример #7
0
 def modify_function(self, words):
     api.send_string(au.OTHER['select{}'.format(words[-1].title())])
     au.do_action(words[0])
Пример #8
0
 def modify_function(self, words):
     api.send_string(au.OTHER['select{}'.format(words[-1].title())])
     au.do_action(words[0])
Пример #9
0
 def line_action(self, words):
     api.send_string('{ctrl+l}')
     atomutils.do_action(words[0])
Пример #10
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])
Пример #11
0
 def single_word(self, words):
     api.send_string('{ctrl+d}')
     atomutils.do_action(words[0])
Пример #12
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])