SENSIBLE-EDITOR(1)
๐ SENSIBLE-EDITOR(1) โ General Commands Manual ๐
โจ NAME โจ
okay so the name is sensible-editor, and its whole job is to launch a sensibly chosen text editor ๐๏ธ๐
๐ SYNOPSIS ๐
sensible-editor [OPTIONS...]
๐ธ DESCRIPTION ๐ธ
bestie, sensible-editor makes sensible decisions about which editor to call so you don't have to ๐ซถ Programs in Debian can invoke this script to get a good default editor, and it's giving reliable energy โจ
okay so here's the vibe: sensible-editor looks for an appropriate editor in a series of places and uses the first candidate that works ๐ It starts by checking environment variables, then a variable defined via select-editor, then the default editor command set by the alternatives system, and then a lineup of hard-coded command names as backups ๐
variables get skipped if they're unset or null, but they can include extra whitespace-separated parameters, like a --verbose flag ๐ฆ Once sensible-editor has a candidate commandline, it tries to run it, passing along the arguments it got as the files to be edited ๐ If that fails because the command couldn't be executed (exit code 126) or was not found (exit code 127), it just moves on to the next candidate. no drama ๐
the candidates it tries, in order, are:
$VISUALโ see environ(7)$EDITORโ see environ(7)$SENSIBLE_EDITOR$SELECTED_EDITORโ see select-editor(1)editorโ see editor(1), update-alternatives(1)- nano(1)
- nano-tiny(1)
- vi(1)
if ALL of these fail, sensible-editor errors out ๐ญ that's the one time it gives up on you, so make sure at least one of them works ๐
iykyk, this whole setup is designed so that individual users can set a personal and/or temporary default that overrides the system-wide defaults ๐ง main character energy for your editor choice โจ
๐ฆ SEE ALSO ๐ฆ
okay these are the besties to check out next ๐ซถ sensible-browser(1), sensible-pager(1), select-editor(1), environ(7), editor(1), update-alternatives(1) ๐
๐ CONFORMING TO ๐
the behavior of sensible-utils on a Debian system is documented in section 11.4 of Debian-Policy ๐ You can find it under /usr/share/doc/debian-policy if debian-policy is installed, or online at https://www.debian.org/doc/debian-policy/ ๐
bestie, that's the whole tea โ๏ธ๐ Debian, 28 Aug 2022, SENSIBLE-EDITOR(1), we love a well-documented editor ๐ โจ
๐ฆ where this page comes from
- debian trixie: sensible-utils 0.0.25 ยท GPL-2.0-or-later
- fedora 43: sensible-utils 0.0.25-2.fc43 ยท GPL-2.0-or-later
- fedora 44: sensible-utils 0.0.26-2.fc44 ยท GPL-2.0-or-later
- ubuntu questing: sensible-utils 0.0.25 ยท GPL-2.0-or-later
- ubuntu resolute: sensible-utils 0.0.26build1 ยท GPL-2.0-or-later
- ubuntu stonking: sensible-utils 0.0.26build1 ยท GPL-2.0-or-later
- ๐ girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms