[Top][All Lists]

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

Re: [Nano-devel] [PATCH] New feature: Erase prev/next word if ctrl is he

From: Brand Huntsman
Subject: Re: [Nano-devel] [PATCH] New feature: Erase prev/next word if ctrl is held with backspace/delete
Date: Fri, 13 Jul 2018 00:31:06 -0600

On Thu, 12 Jul 2018 19:12:31 -0300
Marco Diego Aurélio Mesquita <address@hidden> wrote:

> The attached patch modifies nano so that, when ctrl is held, backspace
> erases the previous word, while delete erases the next word. This is a
> very common feature in many editors and is one of the few reaming that
> I miss from gedit.
> It was quickly hacked but seems to work fine on gnome-terminal and
> xterm. I couldn't find the way to get the key codes for ctrl +
> backspace nor  ctrl + delete; so, I determined it experimentally. It
> would be nice to detect it the same way ctrl+arrows are detected. How
> can I properly get the codes for ctrl + backspace and ctrl + delete?

Your ctrl-backspace works in rxvt-unicode but ctrl-delete doesn't.
Sequence of hex codes:  1b  5b  33  5e

Slightly related, and not sure if I've asked this before, but why is there only 
cut and a cuttoend toggle instead of two separate functions that could be bound 
to two keys? If ctrl-delete cuts next word, alt-delete could cut to end of 
line. And alt-K could cut to end of line instead of toggling, or if 
cutfromcursor is enabled, swap ctrl-K and alt-K.

reply via email to

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