nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] [PATCH] Improve cutting words


From: Brand Huntsman
Subject: Re: [Nano-devel] [PATCH] Improve cutting words
Date: Sun, 5 Aug 2018 02:00:56 -0600

On Sun, 05 Aug 2018 03:56:27 +0300
address@hidden wrote:

> In this patch, I implement suggestions 1 and 4 without changing the 
> navigational behavior of nano.

Not stopping at end of line is better, if you wanted the end of line it would 
be faster to use the 'end' bind. Your patch improves cutwordright (#1) a little 
but does nothing for cutwordleft (#4), it still removes the blank lines and 
word at end of previous line. It also removes all non-word characters when 
cutting left or right across newlines, probably because it doesn't actually 
detect transitions between newlines and non-newlines.


> If suggestions 2, 3, 5 and 6 were considered to be implemented, I
> would suggest creating two different functions specifically for
> cutting words and leaving do_next_word and do_prev_word as is.

Jumping to words and non-words allows quick cutting or insertion without 
needing to use arrows to get there after jumping near where you want. I looked 
at vim and it does exactly what I proposed but doesn't stop at end of lines. 
Maybe a toggle could switch between current nano behavior and a more precise 
vim behavior. But should it toggle both jumping and cutting or should cutting 
always use vim-style?

Vim also has a bind to jump to end of next word (but not to end of previous 
word), and it looks like nano requires a nanorc/cli option to jump to start or 
end of words. It would be nice if that could be toggled in the editor.




reply via email to

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