docs: def create_new_document(self, base_name='New Document',
                              extension='.txt', preferred_eol=0,
                              autodetect_eol=True, **kwargs):
          """
          Creates a new document.
  
          The document name will be ``base_name + count + extension``
  
          :param base_name: Base name of the document. An int will be appended.
          :param extension: Document extension (dotted)
          :param args: Positional arguments that must be forwarded to the editor
              widget constructor.
          :param preferred_eol: Preferred EOL convention. This setting will be
              used for saving the document unless autodetect_eol is True.
          :param autodetect_eol: If true, automatically detects file EOL and
              use it instead of the preferred EOL when saving files.
          :param kwargs: Keyworded arguments that must be forwarded to the editor
              widget constructor.
          :return: Code editor widget instance.
          """
          SplittableCodeEditTabWidget._new_count += 1
          name = '%s%d%s' % (base_name, self._new_count, extension)
          tab = self._create_code_edit(
              self.guess_mimetype(name), **kwargs)
          self.editor_created.emit(tab)
          tab.file.autodetect_eol = autodetect_eol
          tab.file.preferred_eol = preferred_eol
          tab.setDocumentTitle(name)
          self.add_tab(tab, title=name, icon=self._icon(name))
          self.document_opened.emit(tab)
          return tab