[Top][All Lists]

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

Re: `move-end-of-line' in `rectangular region': `goto-longest-line'

From: Kaushal Modi
Subject: Re: `move-end-of-line' in `rectangular region': `goto-longest-line'
Date: Tue, 30 Oct 2018 07:40:45 -0400

On Tue, Oct 30, 2018, 1:16 AM Garreau, Alexandre <address@hidden> wrote:
On 2018-10-30 at 06:07, Garreau, Alexandre wrote:
> Try copying that (without “> ” prefixes) with rectangular selection:
>> a
>> aaa
>> aaaaaaaaaaaaaaaaaaaaaaa
>> aaa
>> a

(This is a followup because initially I wanted to talk about this in my
other mail, and subject are near.)

Something I wished existed out of the box with rectangular-selection, is
C-e (`move-end-of-line') going not at the end of the current line, but
at “max pos” horizontally, that is, on the current line, n chars away
where n is the number of chars of the longest line in (I guess,
non-rectangular) region.  As C-e is often used, I wished its first call
went at the end-of-line, and only a second times it will go at a such

I had ended up writing something in elisp that takes care of that transparently. Search for ";; Rectangle" in https://github.com/kaushalmodi/.emacs.d/blob/master/setup-files/setup-editing.el.

That code "just works" for few years (I think) now. 

reply via email to

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