nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Linus mentioned nano...


From: Benno Schulenberg
Subject: Linus mentioned nano...
Date: Sun, 23 May 2021 16:17:45 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

Hello all,

In a recent interview [1], Linus Torvalds mentioned that as editor he uses an
"abomination called 'micro-emacs'", and that he really needs "to switch over to
something that is actually maintained and does utf-8 properly. Probably 'nano'."

I had a laugh.  He must be joking, right?  :)

Afterward I searched for 'micro emacs' in the package manager and installed 
'mg',
to see whether nano is able to do what mg can do.  It depends a bit what parts
of the editor Linus uses, but judging from the list of default keybindings in
'man mg', there is a whole bunch of things that nano can't do, especially the
splitting of windows.  Some things (like transpose characters or upcase word)
could be hacked up as string binds, but most of the extra things that mg can do
are too specialized to consider introducing them into nano.

But after some googling, I realized that it is not 'mg' that Linus uses, but
'uemacs' [2][3].  So I cloned the repo [4], ran make, and ran './em'.  Then I
had to google for "microemacs cheatsheet" to figure out how to invoke the help
text.  M-? -- followed by ^X 1, to make the window use the whole terminal.

Well, moving the cursor works mostly like in nano (^B ^F ^A ^E ^P ^N ^V), but
'page up' is ^Z instead of ^Y, as ^Y is 'paste' in microemacs.  Now I finally
understand where the absurd putting-the-cursor-at-the-top-left for page up/down
comes from: it is what microemacs does, and the Wikipedia article says that Pico
was based on / inspired by microemacs.  (However, ^Z and ^V in microemacs scroll
for two thirds of the screen, instead of a full screen minus two rows as Pico
does and nano did, and still does with --jumpy.)  Now I also understand why the
--cutfromcursor option exists: that is what microemacs does by default.

Searching in microemacs is weird.  You start a search with M-S (or ^R for a
backward search), type the search string, and then type <Esc> to make it run
the search.  There don't seem to be keybindings for findnext / findprevious.

One thing that I find curious is that M-. always sets the mark, wherever the
cursor is; it never unsets the mark.  But moving the cursor when the mark is
set does not highlight any text -- you just have to remember it is set and
where it is.  :|

Switching to the next buffer is done with ^X x.  There doesn't seem to be a
way to switch to the preceding buffer.  When you want to close a single buffer
(^X k), you have to give the name of the buffer to close.  :|

There have been people who complained that the "GNU nano 2.3.4" pointlessly
took up space in the title bar.  But see what uemacs puts in its 'statusbar':
"uEmacs/Pk 4.0.15".  Oof!  Two characters more than what nano used to have.
And what's worse: it's right next to the filename, making this name harder
to see and read.

Anyway...  Does anyone see anything in the uemacs help text that would be
useful to have in nano?  (The full help text is attached.)  The one thing
that I have seen is in './em --help': a lone + to mean "goto end of buffer"
-- that's much better than the clumsy +-1.

[1] https://www.tag1consulting.com/blog/interview-linus-torvalds-linux-and-git
[2] https://www.emacswiki.org/emacs/MicroEmacs
[3] https://en.wikipedia.org/wiki/MicroEMACS
[4] https://git.kernel.org/pub/scm/editors/uemacs/uemacs.git/

Benno

Attachment: uemacs.hlp
Description: Text document

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]