help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Transposing words over middle words


From: Bob Proulx
Subject: Re: Transposing words over middle words
Date: Thu, 16 Nov 2017 15:26:57 -0700
User-agent: NeoMutt/20170609 (1.8.3)

Eli Zaretskii wrote:
> Why not
> 
>   . move point to "Jack", type C-SPC
>   . type M-2 M-f to move point to "Jill"
>   . type M-0 M-t to swap words
> 
> ?

Oh!  I never knew about that functionality before.

       A numeric argument of zero is assigned a special meaning (because
    otherwise a command with a repeat count of zero would do nothing): to
    transpose the character (word, expression, line) ending after point with
    the one ending after the mark.

That's pretty cool!  I hadn't realized it had this built in.  It still
requires a lot of setup.  One must move to the beginning of one word,
set the mark, move to the beginning of the other word, M-0 M-t or
C-u 0 ESC t if I can't make the meta work on that keyboard.  But it is
quite general and I can think of other cases in my editing where I
might use such a thing.

Thanks!
Bob



reply via email to

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