![]() |
Structured editing | ![]() |
As a general rule, the behaviour of most structured editing operations is conditioned by the current focus. By default, the focus is on the innermost tag that contains the cursor. Whenever some selection is active, the focus is rather on the innermost tag that contains the selection. During structured operations, such as navigating among similar tags, the focus may temporarily be set to something else. The current focus is visually indicated by the innermost cyan box around the cursor.
For instance, the structured insertion commands ⌃←, ⌃→, ⌃↑ and ⌃↓ have a particular meaning both inside tables and trees. Inside tables, they allow you to insert new rows and columns (see figure ?). Inside trees, they correspond to the insertion of new nodes (see figure ?). If you are inside a tree inside a table, then the innermost tag is a tree, and node insertions will take precedence over the insertion of new rows and columns.
For most editing operations, a “default particular behaviour” has been defined. This behaviour may potentially be overridden for a few exceptional tags. In our example of structured insertion, the default behaviour of ⌃← and ⌃→ is to insert a new argument to the tag at the left or at the right of the cursor (when allowed). Inside tables, this behaviour is overridden so as to insert entire columns.
![]() ![]() ![]() ![]() ![]() |
Similarly, still in the case of matrices, the keys ⌃↖, ⌃↘, ⌃⇞ and ⌃⇟ can be used for inserting a new first or last column, resp. a new first or last row. The keys ⌥⌫ and ⌥⌦ are mapped to the commands for backward resp. forward structured deletion. For matrices, this will result in the removal of the column before or after the cursor (see figure ?). In order to remove the enclosing environment you may use ⌥⌫ or ⌥⌫.