Selection Actions
To make common tasks easier, Espresso offers several ways to quickly select chunks of text.
Actions ⟩ Select ⟩ Word (control option W)
If your cursor is at the very beginning or very end of a word, you can easily select it by pressing shift option right or shift option left. However, if your cursor is in the middle of a word, control option W may be a quicker method to select the word (you can also use it if the cursor is at the beginning or end of a word if you like).
Actions ⟩ Select ⟩ Line (shift command L)
Press shift command L to select the entire line (including any leading or trailing whitespace).
Actions ⟩ Select ⟩ Line Contents (option command L)
Press option command L to select only the lines contents (everything except for the leading or trailing whitespace). This can also be a handy way to quickly position your cursor at the beginning of the line's contents; simply press option command L and then left.
Actions ⟩ Select ⟩ Balance (command B)
The Balance action behaves differently depending on context:
- If your cursor is inside of a string or comment (for instance, an attribute value in HTML or a string in Javascript), command B will select the contents of the string or comment.
- If your cursor is between HTML tags, command B will first select the contents of the tags, and then the entire tag. For instance, if your cursor is within the text inside an HTML paragraph, the first command B will select the text, the second will select the
<p>
tags and their contents, and the third will select the paragraph tag's parent's contents (and so forth, if you keep hitting command B). - If your cursor is within code for other languages the behavior will vary on a per-language basis, but in general command B will select the contents of the code block in the Navigator that wraps the cursor, and then the full code block.
You can press command B more than once to move upwards through larger and larger selections.
Actions ⟩ Select ⟩ Balance Inward (option command B)
In general, this will behave inversely to the Balance action. So if you have a <p>
tag selected, option command B will select its contents. However, because code blocks can have more than one child, Balance Inward will only move into the first child it finds.