code: def getlines(self, bufnr=None):
          
          buf = self._vim.buffers[bufnr] if bufnr else self._vim.current.buffer
          return buf[:]
docs: Get all lines of a buffer as a list.
  
          Args:
              bufnr (Optional[int]): A Vim buffer number, current if ``None``.
  
          Returns:
              List[str]