If you want to live in the future, you can't use programs written in the past. There are many fine GUI text editors: leafpad is your basic bare-bones notepad-alike, and for my money Kate is the best 'notepad++' mega-text-editor that's still light enough to start instantly.
No, that exists for a long time and is widely implemented among terminal software. Demo: https://github.com/tinmarino/mouse_xterm
I'm sorry, but this is plain wrong.
gpm [0] supplies a mouse server for the console, and has been around for a very long time (the oldest release I could find was 1995). SSH, nano, vim and more all understand the events driven by it. This should even work under a raw tty, rather than a terminal emulator, in any shell, from ash to zsh.
The terminal absolutely understands the mouse, you just need to enable the bridge that lets it all work.
And when the user selected text using GPM, the program (e.g., nano) never learned of it: it was local to GPM and the linux console.
The man page you linked states, "The selection mechanism is disabled if the controlling virtual console is placed in graphics mode, for example when running X11, and is re-enabled when text mode is resumed," (then goes on the describe how sometimes it does not get re-enabled because of a bug).
Can a modern PC even be put into text mode anymore? (Honest question: I do not know.)
Have you ever gotten GPM to work with X11 or Wayland?
If you enable mouse support. (set mouse for nano and set mouse=a in vim).
> Have you ever gotten GPM to work with X11 or Wayland?
That'd be rather... Pointless. X11 and Wayland already allow the mouse to work without GPM. Just enable the mouse in nano, vim or whatever, and it'll work.
So for example, the user cannot use the mouse to move the insertion point in nano.
That is not the case if you enable mouse support, as I've said.
Try it. Add:
set mouse
To ~/.nanorcOpen a file, and click. The insertion point will move.
set mouse=a
But yes, it works basically the same. set mouse
set nowrap
set softwrap
With those three lines in ~/.nanorc, it now allows you to click n drag the mouse, and may work over ssh, depending on your terminal support, and wraps lines without inserting actual breaks.It effectively is Notepad, as far as I'm concerned.
For those who aren't touch typists, or occasional users, nano is just more comfort than vim or emacs.
And there is a editor named `micro`, which is similar to nano but has more features including bracket completion etc.. I am delaying switch because it is written in go (being unavailable in repos) and anyway I haven't found time to configure it. But it is scriptable in lua..
I can see this being okayish when logging into a dev EC2 instance or something ephemeral but it's not something I would ever want to do on something important.
And yes, it uses mouse-based select/cut/copy/paste, with line- and block- level operations.
Basically on those systems you can expose code as UI callable operations, select code and give it to them.
I use a Macbook as my keyboard/trackpad combo, so my “mouse” is actually extremely close to the keyboard, and I don’t have to move my hand much.
Learn those cursor movement keys combos and you'll find it ends up being way faster to get to the middle of your line to drop your ctrl-v that way once you're used to it.
Not that I mean to rag on you in a superior way like so many keyboard-only primadonnas like to. You do you, and I understand that for a lot of people the investment in learning this non-critical stuff just isn't worth the time.