Next: Imenu, Previous: Moving by Defuns, Up: Top-Level Definitions, or Defuns [Contents][Index]
28.2.3 Moving by SentencesThese commands move point or set up the region based on units of code, also called sentences. Even though sentences are usually considered when writing human languages, Emacs can use the same commands to move over certain constructs in programming languages (see Sentences, see Moving by Defuns). In a programming language a sentence is usually a complete language construct smaller than defuns, but larger than sexps (see List Motion in The Emacs Lisp Reference Manual). What exactly is a sentence in this case depends on the programming language, but usually it is a complete statement, such as a variable definition and initialization, or a conditional statement. An example of a sentence in the C language could be
or in the JavaScript language it could look like
const thing = () => console.log("Hi");
const foo = [1] == '1' ? "No way" : "...";
Move to beginning of current or preceding sentence (backward-sentence
).
Move to end of current or following sentence (forward-sentence
).
The commands to move to the beginning and end of the current sentence are M-a (backward-sentence
) and M-e (forward-sentence
). If you repeat one of these commands, or use a positive numeric argument, each repetition moves to the next sentence in the direction of motion.
M-a with a negative argument −n moves forward n times to the next end of a sentence. Likewise, M-e with a negative argument moves back to the start of a sentence.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4