1SENSIBLE-EDITOR(1)          General Commands Manual         SENSIBLE-EDITOR(1)
2
3
4

NAME

6       sensible-editor - launch sensibly chosen text editor
7

SYNOPSIS

9       sensible-editor [OPTIONS...]
10

DESCRIPTION

12       sensible-editor makes sensible decisions on which editor to call.  Pro‐
13       grams in Debian can invoke this script to get a good default editor.
14
15       sensible-editor looks for an appropriate choice of editor in  a  series
16       of  places,  and  uses  the  first  candidate that works.  It starts by
17       checking environment variables, followed by a variable defined via  se‐
18       lect-editor,  then  tries the default editor command defined by the al‐
19       ternatives system, with a series of hard-coded command names  as  fall‐
20       backs.
21
22       Variables  will  be  skipped  if  unset  or null, but may include extra
23       whitespace-separated parameters such as a --verbose flag.  Once  sensi‐
24       ble-editor  has a candidate commandline, it will try to run it (passing
25       on the arguments it was given as the files  to  be  edited).   If  this
26       fails  because  the command couldn't be executed (exit code 126) or was
27       not found (exit code 127), it tries the next candidate.
28
29       The specific candidates sensible-editor tries, in order, are:
30
31$VISUAL - see environ(7)
32
33$EDITOR - see environ(7)
34
35$SENSIBLE_EDITOR
36
37$SELECTED_EDITOR - see select-editor(1)
38
39editor - see editor(1), update-alternatives(1)
40
41nano
42
43nano-tiny
44
45vi
46
47       If all of these fail, sensible-editor errors out.  This system  is  de‐
48       signed  to  make  it easy for individual users to set a personal and/or
49       temporary default, overriding the system-wide defaults.
50

BUGS

52       This command takes precautions against launching itself in an  infinite
53       loop if a user sets EDITOR=sensible-editor but indirect loops are still
54       possible.
55

SEE ALSO

57       sensible-browser(1), sensible-pager(1),  select-editor(1),  environ(7),
58       editor(1), update-alternatives(1)
59

CONFORMS TO

61       The  behavior  of sensible-utils under a Debian system is documented in
62       section 11.4 of Debian-Policy, available  under  /usr/share/doc/debian-
63       policy  if  debian-policy  is  installed,  or online at https://www.de
64       bian.org/doc/debian-policy/
65
66
67
68Debian                            28 Aug 2022               SENSIBLE-EDITOR(1)
Impressum