Plain Text Editor

approved

by David Enderson

Edit plain text files in a minimal editor that provides optional line numbers. - This plugin has not been manually reviewed by Obsidian staff.

30 downloadsUpdated 6d agoMIT

Plain Text Editor

A clean, simple Obsidian plugin for editing plain text files (.txt), as well as any other file extension you tell it to use.

Features

  • Your monospace font. The editor uses the monospace font settings, from Settings > Appearance > Monospace font, as well as Settings > Appearance > Font size.
  • Optional line numbers. A settings toggle allows you to view or hide line numbers for your plain text files.
  • Follows your theme. Colors, font size, and light or dark mode come from Obsidian's configured theme.
  • Turn notes into text files, and back. Right-click a note and choose Convert to plain text file to rename it from .md to .txt, or to whichever extension you pick if more than one is configured. Right-click a text file and choose Convert to markdown note to go the other way. The extension changes, along with which editor opens the file. The file's contents is not modified during this change.
  • Line endings are preserved. Each file keeps the line endings it already has (LF, CRLF, or CR).
  • Convert line endings if you wish to. You can convert a files's existing line endings to Windows (CRLF) or macOS & Linux (LF) if you wish.
  • Typing aids are your call. Spellcheck follows Obsidian's setting unless you override it. On iPhone, iPad, and Android, autocorrect, auto-capitalization, and inline predictions are off by default, but you may turn them on if you wish.
  • Any extensions you like. This plugin uses .txt by default. In settings you can configure additional file extensions such as .log, .text, or any other extension not already in use by another plugin. When added, Plain Text Editor will also open those files. When more than one extension is configured for use, when you create a new plain text file, a dialog asks which extension you would like to use.
  • Safe with non-text files. Files that are not valid UTF-8, such as legacy Windows "ANSI" or UTF-16 files, open as read-only with a warning instead of being corrupted on save.
  • Works on mobile as well as desktop.

Undo history, search and replace, and touch input behave the way they do when editing normal markdown notes.

Settings

SettingDefaultNotes
File extensionstxtComma-separated. Restart Obsidian, or disable and re-enable the plugin, for this setting to take effect.
Line endings for new filesmacOS & Linux (LF)Existing files keep their own line endings.
Show line numbersOffApplies to open files immediately.
SpellcheckFollow the Obsidian settingOr force it on or off for text files only.
Auto-correctionOffiPhone, iPad, and Android only. Desktop apps do not offer this.
Auto-capitalizationOffiPhone, iPad, and Android only.
Inline predictionsOffiPhone, iPad, and Android only. The gray suggested text that iOS shows as you type.

If another plugin already handles one of the configured extensions, this plugin shows a notice and leaves that extension to the other plugin.

Contact info

If you love this plugin, please drop me a line. I love a good compliment! :-) david@enderson.me

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.