
Needless to say, this only works if you have XDG, i.e. On XDG systems, of course, you could simply touch path/to/new/file.txt On Debianish systems, the system default editor is configurable via alternatives and available simply with the command editor. If this variable is set, I'm thinking you can be reasonably confident that they will know how to use it, even if they end up in something horrible like nano.Ī slightly newer convention is to set VISUAL to the preferred "visual editor" - I guess the terminology comes from vi to contrast against line editors like ed.

Traditionally, users would set the environment variable EDITOR to the path of their editor of choice.

There is no completely reliable concept of "default editor" on Linux, let alone more broadly Unix-like systems.
