GNU TeXmacsUser manualReferenceAboutEnglish·Français·中文
Structured cursor movement

TeXmacs implements the three main mechanisms for structured cursor movement:

  1. Traversal of the entire structure of the document.

  2. Traversal of tags that are similar to the innermost tag.

  3. Movements inside the innermost tag.

Most keyboard shortcuts for structured cursor movements can be used in combination with the ⇧-key so as to simultaneously select text while moving around.

Structured traversal of the document

The ⌥←, ⌥→, ⌥↑ and ⌥↓ keys are used for the structured traversal of the entire document. Inside plain text, ⌥← and ⌥→ allow you to move in a word-by-word manner, whereas ⌥↑ and ⌥↓ correspond to paragraph-by-paragraph motion.

In the presence of other markup, the ⌥← and ⌥→ keys allow you to visit all accessible cursor positions in the document, except that we keep moving in a word-by-word manner inside plain text. The behaviour of the ⌥↑ and ⌥↓ keys is more context-dependent. Inside matrices, they typically allow you to move one row up or down.

Traversal of tags that are similar to the innermost tag

This type of cursor movement allows you to quickly visit all other tags in the document that are similar to the innermost tag. The ⌥⇞ and ⌥⇟ keys allow you move to the previous or next similar tags, whereas ⌥↖ and ⌥↘ directly jump to the first or last similar tags.

For instance, if you are inside a section title, then you may move to the previous sectional title using ⌥⇞. Subsection and chapter titles are in particular understood to be “similar” to section titles. Notice that you may use ⌥§ to jump to the previous section title.

Movements inside the innermost tag

It is also possible to quickly move inside the innermost tag without quitting it. The shortcuts ⌘⌃←, ⌘⌃→, ⌘⌃↖ and ⌘⌃↘ provide a way to move to the previous, next, first or last argument of the innermost tag. Furthermore, the shortcuts ⌘⌃⌫ and ⌘⌃⌦ may be used to exit the innermost tag on the left or on the right.

This default behaviour may be overridden in special contexts. For instance, inside tables or trees, they rather correspond to cell-by-cell or node-by-node cursor movement. In addition, these cases associate vertical cursor movements to ⌘⌃↑, ⌘⌃↓, ⌘⌃⇞ and ⌘⌃⇟.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".