Skip to content

Plain 0.2.0

Choose a tag to compare

@dhh dhh released this 10 Nov 20:50
· 66 commits to master since this release

Faster

  • Typing in a long file no longer lags: a keystroke at the end of a 10,000-line config takes 2 ms instead of 160. Files now load through Qt Quick's TextEdit, which draws only the visible lines of a long text.
  • Opening is about twice as fast: a 10,000-line config in 0.27 s instead of 0.5, a 2,000-line one in 60 ms.
  • Lines over 2,000 characters stay uncolored, so a minified file's single line opens in 12 ms and types at 10 ms a key instead of half a second.
  • Files over 1 MB are put aside before reading them, and saving other files in the same folder no longer makes Plain reread the open one.

Safer saving

  • Overwrite in place now checks the file on disk first, like Save, so it never writes over changes made elsewhere since you opened it.
  • A save stops when the file can't be read back to check it hasn't changed.
  • Reload keeps your text when the file on disk has become unreadable, isn't text, or is gone, instead of emptying the editor.
  • A file ending in a cut-off UTF-8 sequence is refused instead of being opened without those bytes, which saving would have dropped.
  • Replacing a file asks first when it would change the file's group, and a failed restore of special permission bits is reported.
  • A new file in a folder you can't write opens locked, like a read-only file.

Editing

  • The find bar is at the top, its match count follows your edits, and Ctrl+G 1 2 Enter typed quickly lands every key in Go to line.
  • Tab over a selection within one line replaces it with the indentation.
  • Dismissing the save dialog while closing or opening another file cancels that, and saving an untitled file before opening another goes on to open it.
  • The shortcut overlay and Go to line follow the desktop's text size.

Verified by Codex.