Close Lines

From TED Notepad
Revision as of 21:40, 25 April 2011 by Jsimlo (talk | contribs)
This section is up to date for TED Notepad version 6.3.1.0.
Control page Control:feature:Close Lines

Close.. (Alt+Ctrl+C)

Asks for a Close phrase to work with and then closes each line of the selection with the specified phrase, i.e. appends the specified phrase to each line.

Optionally, Close non-empty lines only can be used to close non-empty lines only, which ensures that empty lines are not modified at all.

Optionally, using the Skip tail spaces, the closing phrase may be inserted just before all tail white-spaces on each line. This way, any current end-of-line white-spaces are kept unmodified, and the closing phrase is prepended to those white-spaces, after the last graph (i.e. non-white-space) character.

Note: When closing of empty lines is allowed, and tail white-spaces are to be skipped, special consequential case occurs. On empty lines, closing phrase is prepended, because tail white-spaces is all that those line contain.

Note: The selection always persists in this tool.

Example: (an e-mail received from a user)
----- Original Message ----- Great notepad! Tabs, you need tabs for multiple documents. Cosmetic, supeficial, of course. But that's what people are looking for these days.
Result, using Close: <br> and Close non-empty lines only checked:
----- Original Message ----- Great notepad!<br> Tabs, you need tabs for multiple documents. Cosmetic, supeficial,<br> of course. But that's what people are looking for these days.<br>

Tip: Combine the Quote Lines tool with the Close Lines tool in order to write paragraphs or lists in HTML documents without having to bother with <p> or <li> tags while writing. Write all paragraphs first, each one on a separate line (you may use Word Wrap (hotkey Ctrl+W) to see long lines automatically wrapped into several lines, since the Word Wrap does not affect tools). When done, select all the lines and use both Quote Lines and Close Lines tools to add the <p> and </p> tags (or <li> and </li> tags) to each line.

Example:
Great notepad! Tabs, you need tabs for multiple documents. Cosmetic, supeficial, of course. But that's what people are looking for these days.
Result, quoting with <li> and closing with </li>:
<li>Great notepad!</li> <li>Tabs, you need tabs for multiple documents. Cosmetic, supeficial,</li> <li>of course. But that's what people are looking for these days.</li>