def _getLines(self): if Util.isPython(): return ['', 'mock line 1', 'mock line 2', 'mock line 3'] else: import vim result = [''] for line in vim.current.buffer: result.append(line) return result
def setLines(self, lines): self.lines = [''] self.lines.extend(lines) if Util.isPython(): pass else: import vim vim.command(':normal ggdG') for line in self.loop(): vim.command(':normal o%s' % line) vim.command(':normal ggdd')
def _getName(self): if Util.isPython(): return 'mock' else: import vim return vim.current.buffer.name