nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] [PATCH] cutting: when deleting whole words, don't join


From: Brand Huntsman
Subject: Re: [Nano-devel] [PATCH] cutting: when deleting whole words, don't join lines unexpectedly
Date: Sun, 2 Sep 2018 17:14:43 -0600

On Sun,  2 Sep 2018 13:30:40 +0200
Benno Schulenberg <address@hidden> wrote:

> [This isn't the desired behavior that I described (which, it turns
> out, is almost exactly how Firefox and Thunderbird behave for
> Ctrl+Bsp and Ctrl+Del), but I quite like it.  And it costs less than
> fifteen lines.] ---

It doesn't work, cut-next at end takes newlines+whitespace, but cut-prev at 
start takes newlines+whitespace+word. They both must do the same thing, cut 
word or don't cut word. And cutting word is the wrong choice, it doesn't allow 
cutword to be used to join two lines or paragraphs. And before you mention 
using backspace or delete key to join lines, try it in nano's NEWS file (13 key 
presses to remove those indents).

My patch can easily be extended to allow move/cut modes like vim. The current 
word bounds mode in nano isn't even supported in vim, probably because it is 
useless for cutting in source code. But two toggles could cycle the move and 
cut keys between nano-style, whitespace, and a transition between AN/non-AN 
characters. The modes could be set in nanorc or changed via binds.




reply via email to

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