One of the things that really, really annoys me when I get lazy and use a pre-bundled set of (neo)vim plugins is how every one of them uses mouse functionality. I only use the mouse to copy/paste from the terminal to system clipboard. I don’t want it hijacking him and entering visual mode.
Recently had to edit the hosts-file on a remote host, and I don’t know if using two proxy jumps to SSH into it broke it, but it just wouldn’t let me select text with the mouse.
I had to duplicate seven lines and edit the IP addresses, and without being able to copy-paste, I already saw myself manually typing it out.Then I remembered that in Vim, you can do
d5↓
to delete 5 lines. Surely that would also work with copying/yanking. And yep, ay7↓
and ap
aste later and I had duplicated the lines.Then use the multi-line cursor like I routinely do for changing all 7 IP addresses…
…and now I feel like I’ve crossed the line where people will think I’m just a wizard.I’ve been using vim as my primary text editor and IDE for near a decade. I forgot that this was a thing so, I’ve been using visual mode like a peasant.
Ctrl-K and Ctrl-U in nano, a sane editor that does not hate you
Doesn’t that just cut one line at a time? Or is this Emacs-like, where it buffers the lines?
That host doesn’t have internet access, though, so installing a different editor wasn’t really an option to begin with…
How do I do regex or connect to an LSP with nano?
Ctrl-X Ctrl-V in micro, if you appreciate a sane editor with sane keybindings.
Shit, the touchpad is right there. They even cut a hole for it in the case. I think im gonna use it.
Okay but… obligatory “gVim offers the best of both worlds by offering use of a mouse if you want it”. There are also native ports for Mac OSX and Windows, etc.
Vim, in contrast, is a command-line program, suited for e.g. working with a text file on a remote server that may not even be running an X-windows interface, or maybe the user simply did not bother to connect to it:-).
Okay, we may now proceed with the humorous jesting:-).