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

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

Re: Skipping words with C-<right> like other editors do


From: Yuri Khan
Subject: Re: Skipping words with C-<right> like other editors do
Date: Mon, 16 Apr 2018 15:22:07 +0700

On Mon, Apr 16, 2018 at 6:34 AM, James K. Lowden <jklowden@speakeasy.net> wrote:
>> !text! ---! ^^^! ***! ///! ;;;! aa!-!xx! bb!
>> !text !--- !^^^ !*** !/// !;;; !aa!-!xx !bb!
>
> Somewhere in the documentation, a rational argument is made for emacs's
> choice.  By defining forward-word and back-word asymetrically,
> navigation in either direction is sped up.

Asymmetry is probably not the source of annoyance here. Speed is.

I tested the same line with Mousepad, Gedit, Midnight Commander,
Firefox, Vim, and Emacs. (Vim has a richer vocabulary of word motion
commands; I noted them separately.)

    Ctrl+right →
    text --- ^^^ *** /// ;;; aa-xx bb
    |   |                      |  |  |   Emacs *scratch*
    |   |   |   |   |   |   |  || |  |   Gedit, Mousepad
    |   |       |    |   |      | |  |   Firefox
    |    |   |   |   |   |   | ||  |     Midnight Commander, Vim w
    |    |   |   |   |   |   |     |     Vim W
    |  |   |   |   |   |   |  || |  |    Vim e
    |  |   |   |   |   |   |     |  |    Vim E

    Ctrl+left ←
    text --- ^^^ *** /// ;;; aa-xx bb
    |                        |  |  | |   Emacs *scratch*
    |        |      |   |    |  |  | |   Firefox
    |    |   |   |   |   |   | ||  | |   Gedit, Mousepad, MC, Vim b
    |    |   |   |   |   |   |     | |   Vim B
    |  |   |   |   |   |   |  || |   |   Vim ge
    |  |   |   |   |   |   |     |   |   Vim gE

So, observations:

* Most “reduced instruction set” editors have different stops for
forward and backward movement. Emacs is not the odd one here.

* Firefox does something that is very hard to describe.

* Emacs makes much fewer stops in comparison with other editors.
Namely, it stops only at transitions from letters to non-letters,
while most other editors stop at transitions from letters to
whitespace, letters to punctuation, and punctuation to whitespace.


I think it might be worthwhile to try implementing word motion
commands that takes into account both word-constituent and whitespace
syntax classes.



reply via email to

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