Esempio n. 1
0
 def __line_move(self, direction):
     vim.current.line = ' ' + vim.current.line[1:]
     vim.normal(direction)
     vim.current.line = '>' + vim.current.line[1:]
Esempio n. 2
0
def transform_selection(f):
    cr = anything.range
    new_text = [ f(line) for line in cr[:]]
    cr[:] = None
    vim.insert(cr.start, new_text)
    vim.normal("V%dj" % (len(new_text) - 1) )