In GNU nano 7.2 (the latest as of this posting, as far as I know), why does Ctrl+Delete delete entire words but not Ctrl+Backspace? How do we restore its correct functionality?
In GNU nano 7.2 (the latest as of this posting, as far as I know), why does Ctrl+Delete delete entire words but not Ctrl+Backspace? How do we restore its correct functionality?
15 Comments
HiTekRedNek@lemmy.world · 11 pts · 77d
stares in signature look of vim superiority
Thwompthwomp@lemmy.world · 10 pts · 77d
waits 3 minutes to read this comment condescendingly in emacs with some really sweet customizations
Steamymoomilk@sh.itjust.works · 5 pts · 77d
wants to reply to comment but doesnt remember the custom key combo
Novocirab@feddit.org · 3 pts · 77d
shakes head about this blatant lack of basic competency:wq!
Strider@lemmy.world · 2 pts · 77d
Arrives late bimut) but smirks..
:x
chonkyninja@lemmy.world · 1 pts · 74d
C-x C-r m
Flagstaff@programming.dev · 2 pts · 74d
I cannot stand the yuhjklbn or whatever navigation! How do you even memorize that? It's so counterintuitive...
HiTekRedNek@lemmy.world · 1 pts · 74d
My arrow keys work perfectly fine in vim.
Vi is not vim.
How can you say you prefer ^W ^T text to search enter text to replace it with enter
to: :s/text to search/text to replace/gcenter
Flagstaff@programming.dev · 1 pts · 69d
Dude, I tried gvim and I just cannot make heads or tails of its control scheme. It's Geany for me; your brain is bigger than mine.
HiTekRedNek@lemmy.world · 1 pts · 68d
Eh. vi was the original editor. I've been around computers since the early 1980s, so it's just what I'm used to.
When vim came out in 91 that was a major upgrade, and I already had the muscle memory for vi.
My home computer from 1983 until 1991 was a C64. But I was dialing into unix gopher servers from about 1985.
BBSs were more fun, but gopher helped me write term papers for AP/Honors Physics II in high school....
tal@lemmy.today · 7 pts · 77d
I have GNU nano 8.4 on my system. Upon investigation, in default configuration:
Control-Backspace deletes the last character, same as Backspace.
Control-Delete reverse-deletes a word.
Alt-Backspace deletes the last word. This might be what you want.
Alt-Delete deletes the entire line.
I think that it's probably because absent some kind of unusual extension, terminals normally send 0x08, the Backspace character, same as Control-H, for Control-Backspace.
On my system, in bash, using foot, Control-V Control-H shows
^H. So it's sending ASCII 0x8, the Backspace character.Control-V Control-Backspace shows
^H. Ditto.Control-V Backspace shows
^?. It's sending the Delete character, ASCII 0x7f.Control-V Del shows
^[[3~. It's sending an escape sequence.Back in the day, some people had their terminals set to, when you hit Backspace, send either the Backspace character or the Delete character. Not a problem I've run into for some years, but I'd guess that nano probably has that behavior by default, treating both 0x7f and 0x8 as hitting the Backspace key, so as not to break on systems like that.
EDIT: I'd also add that Alt-Backspace (well, M-DEL in emacs parlance) is also what emacs uses for "delete word", so a lot of software that uses readline, like bash, will also normally work that way out of box.
EDIT2: If you want to investigate ways to have terminals recognize more key combinations (so that you aren't sending the same sequence for both Control-H and Control-Backspace and want to get down and dirty aiming to configure software to use different bindings for those different keystrokes), IIRC the
kittyvirtual terminal emulator has been exploring extensions, and some terminal emulators have implemented some of those extensions.searches
Yeah.
https://terminfo.dev/extensions/kitty-keyboard-protocol
That being said, I would guess that a lot of programs that run in the terminal won't be set up out of box to rely on Kitty protocol extensions.
EDIT3: Also, I don't think that fbcon (the default Linux kernel framebuffer console) or fbterm (the userspace virtual terminal), one of which you'd probably use if you switched out of Wayland/X11, presently support Kitty input extensions, so if you rig up programs to rely on said extensions, you won't have those keys available in the plain ol' Linux console.
jahtnamas@slrpnk.net · 4 pts · 77d
is that not something you can change the bind of in your
.nanorc?Flagstaff@programming.dev · 1 pts · 75d
I had no idea that existed, thanks. I'm a Windows convert who barely knows my way around Mint as it is and will have to go digging around.
Novocirab@feddit.org · 1 pts · 77d
The latest version is 9.0, no? https://en.wikipedia.org/wiki/GNU_nano
That's also the version I got on my system. But the behavior is the same as you describe: Ctrl+Backspace doesn't delete words
Flagstaff@programming.dev · 1 pts · 75d
Oh, wow, why is Mint 22.3 so behind? Why is it not taking effect with
sudo apt update/upgrade?