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: Skip Montanaro
Subject: Re: Skipping words with C-<right> like other editors do
Date: Sun, 15 Apr 2018 17:09:51 -0500

While I agree with Emanuel's and Tim's comments (learning the basics
of Emacs' elementary cursor movement bindings is a good idea), I think
rdiez is actually complaining about how streams of characters are
divided into "words". I suspect the problem would exist with
forward-word. Right-word (target of C-right key binding) is little
more than a choice between forward-word and backward-word.

I think you probably want to tweak the relevant syntax table for the
editing mode you find yourself in most of the time. If you write
Python code, then overriding python-mode-syntax-table is probably what
you want. If, on the other hand, you mostly edit prose in text-mode,
then look at replacing text-mode-syntax-table. The key bit of
documentation you will want is the function documentation for
modify-syntax-entry. (C-h f modify-syntax-entry RET). The Emacs Lisp
reference manual has more detail:

https://www.gnu.org/software/emacs/manual/html_node/elisp/Syntax-Tables.html

I'd actually start there, maybe with an example syntax table for
something you are familiar with by your side.

Skip



reply via email to

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