Close Lines

From TED Notepad
Revision as of 16:37, 28 April 2010 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.

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, only non-empty lines can be appended to, which ensures that empty lines are not modified at all.

Optionally, 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 simply prepended, because tail white-spaces is all that those line contain.

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: As the example above shows, if you are writting an HTML document, you may write all the text of such document first without having to bother with HTML tags. When done, select the lines, invoke the Close.. tool (hotkey Alt+Ctrl+C) and enter whatever phrase you want to be appended to each line (e.g. a <br> tag).

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

and

tags (or

  • and
  • tags) to each line.