TutorialStructural Motion




Prev | Up | Next | Back | Forward | Tutorial Top

We have seen that as a side-effect of changing the insertion cursor or the textual selection, the structural selection is updated. Such adjustments of the structural selection are secondary effects. We now describe operations whose primary purpose is to establish the structural selection. For these commands, it is the insertion cursor that tracks the structural selection.

Structural-motion commands offer an accurate and efficient way to navigate with respect to the structure of code. For example, commands forward-subphrase (menu: Structure/Forward/Subphrase   X: Ctrl+Shift+N  NT: F8 ) and backward-subphrase (menu: Structure/Backward/Subphrase   X: Ctrl+Shift+P   NT: F7 ) advance forward and backward, respectively, in subphrases.

Note that the insertion cursor tracks the structural selection after each command. Structural-motion commands do not typically set the textual selection.

Some structural-motion commands materialize placeholders at locations where optional syntactic elements are permitted. The RETURN key is actually bound to such a command: forward-from-insertion-point.

Suppose you wish to insert a new statement immediately after some large structured statement. Command forward-phrase-with-optionals (menu: Structure/Forward/Phrase with Optionals   X: Shift+ALT+^M   NT: Shift+F8) can be used to move there immediately without having to search visually for the correct position.


Forward