code: def newline(self, copy_margin=True):
          
          if copy_margin:
              self.insert_text('\n' + self.document.leading_whitespace_in_current_line)
          else:
              self.insert_text('\n')
docs: Insert a line ending at the current position.