News for hackers. Stuff that matters.
Re:micro – A Modern Alternative to nano by mpsprd on Friday August 18, 2023 @11:57AM (#37177496)
I wonder, who is this for?

I feel this kind of editor is for the sophisticated minimalist, used alongside a 60% fancy keyboard with ceramic key caps.

I see comments about this being good for "beginners", and I wonder what definition they are using. Make them use a basic graphical editor like gedit.

Re:micro – A Modern Alternative to nano by linuxdude314 on Friday August 18, 2023 @12:48PM (#37178368)
Nano is not a powerful text editor and is generally only used by non sophisticated users.
Re:micro – A Modern Alternative to nano by neutrono on Friday August 18, 2023 @03:35PM (#37180978)
What is nano lacking in power?
Re:micro – A Modern Alternative to nano by gilcot on Saturday August 19, 2023 @02:56PM (#37191899)
Last time I try it, I wasn't able to figure out an equivalence of « d)Gp »
Re:micro – A Modern Alternative to nano by tpoacher on Tuesday August 22, 2023 @04:05PM (#37227859)
Nano doesn't have a default keystroke for "match an end-of-sentence" character, though creating such a binding in .nanorc is trivial.

However, since what this typically means in practice is you'd either cut until the next period, or until the end of the line, in the absence of an "end of sentence" keybinding, my approach to this would simply be to either cut until the next period, or until the end of the line as required, which I believe is a wholly reasonable alternative.

The former would be:

  {mark} {search} . {enter} {cut} {endoffile} {paste}    (7 keystrokes)
The latter would be

  {cuttoend} {endoffile} {paste} (3 keystrokes)
The 7 keystrokes become very vim-competitive when you realise that d)Gp actually fucks up in the typical scenario, since usually what you want is NOT to paste after the first character of the last line, but actually in a new line below the last one. Which means you don't actually just do `p`, but something like `o ESC p` instead.
Re:micro – A Modern Alternative to nano by pie_flavor on Friday August 18, 2023 @01:19PM (#37178934)
I use VS Code, but I don't use it for $EDITOR, because CLI programs popping up GUI windows always feels icky to me (and it's gotten orphaned once or twice). micro is a really great editor for people who don't use terminal editors for much.
Re:micro – A Modern Alternative to nano by mpsprd on Friday August 18, 2023 @01:42PM (#37179327)
Ok I see. Its $EDITOR for people that dislike modal editors.
Re:micro – A Modern Alternative to nano by peferron on Friday August 18, 2023 @03:03PM (#37180515)
I'm not on VS Code but I use micro as $EDITOR for the exact same reasons and it's great. I don't have to remember special shortcuts just to amend a git message or do an interactive rebase.
Re:micro – A Modern Alternative to nano by Narushia on Friday August 18, 2023 @03:01PM (#37180498)
It is for me, who

– sometimes needs to make a few quick edits right from the terminal (but prefers a proper GUI text editor like VS Code for longer sessions)

– is accustomed to the keyboard shortcut conventions of desktop applications on Linux/Windows[1]

– occasionally, wants to use the mouse and expects it to work in the terminal like it would in a proper GUI text editor.

Micro fulfills all these needs with its default configuration. It is one of the first things I install on a Linux box, be it a desktop or a server.

[1]: https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts