Enclose Selection

From TED Notepad
Revision as of 17:15, 22 April 2011 by Jsimlo (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You see work in progress here; this section already reflects future TED Notepad version 6.0.0.14.
This section may contain incomplete, premature, or mistaken information, prone to change without notice.

Enclose Selection.. (Alt+Ctrl+E)

Asks for two phrases and then encloses the selection with them. The first one (Before) is placed before the selection, the second one (After) is placed after the selection.

If there is nothing selected while using this tool, then the caret is placed between the two inserted strings.

Example:
TED Notepad for Windows is a freeware text editor, ...
Result, using Before: <b> and After: </b>:
TED Notepad for Windows is a <b>freeware</b> text editor, ...

Tip: This tool is most suitable for repeating phrases where only some part of those phrases varies and this variance occurs somewhere in the middle of them. Every time you need to use such phrase, either invoke this tool on empty selection and then type the varying part right in, or type the varying part first and then select it and enclose it. Remember: If there is nothing selected while using this tool, then the caret is placed between the two inserted strings.

Tip: If you need to enclose with XML or HTML tags, use the XML/HTML Tag tool instead.

Tip: If you need to enclose entire subsequent lines, it is better to select all of them at once and use Quote Lines tool (hotkey Alt+Ctrl+Q) and then Close Lines tool (hotkey Alt+Ctrl+C) instead of selecting each one of them separately and performing the Enclose Selection again and again.

See also XML/HTML Tag tool.