editor

command
v1.9.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2026 License: BSD-3-Clause Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command editor is a small text editor on a WidgetsApp, without Material. The left panel is a multi-line EditableText with undo and redo (Ctrl+Z, Shift+Ctrl+Z and Ctrl+Y). Ctrl+S, a Shortcuts binding that maps to a SaveIntent, writes the text to $XDG_DATA_HOME/glutter-editor/notes.txt (or ~/.local/share/...; on Windows %APPDATA%\glutter-editor\notes.txt) in a goroutine with a context.Context; a failure shows in the status bar. A web page has no data directory, so on the web (foundation.IsWeb) the notes are kept in memory for as long as the page is open, and the status bar says so. The right panel is a read-only SelectableRegion with the saved file, which you can select and copy. The status bar shows the line and column of the caret, the number of lines, words and characters, and whether the text has unsaved changes. It uses only the public packages.

Run it with: go run ./examples/editor On the web: go run ./cmd/glutter-web serve ./examples/editor On Windows: go run ./cmd/glutter-windows run ./examples/editor (under Wine on Linux). The text is typed through the keyboard layout and the input method of Windows (IMM32), Ctrl+C and Ctrl+V use its clipboard, and the notes go to %APPDATA%\glutter-editor. What Windows lacks here: reconversion and the touch keyboard's handwriting panel (SPEC §25.7), and the primary selection (middle-click paste).

Environment: GLUTTER_BACKEND=x11|wayland (Linux) or win32 (Windows), GLUTTER_SCREENSHOT=<file.png>, GLUTTER_SCREENSHOT_AFTER=<duration>. In debug builds: GLUTTER_DEV_DATA_DIR=<dir> keeps the notes in that directory (instead of the data directory of the user), GLUTTER_DEV_TEXT=<text> replaces the text of the editor once the saved file is loaded (\n is a new line), and GLUTTER_DEV_SELECT=<start,end> selects that byte range of the text.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL