Difference between revisions of "Text tools"

From TED Notepad
Line 1: Line 1:
<noinclude>{{manversion|5.0.0.10}}</noinclude>__NOTOC__
+
<noinclude>{{manversion|5.0.0.13}}__NOTOC__</noinclude>
 
 
====Indent Selection (Ctrl+Tab)====
 
 
 
Indents each {{defined|line}} of the selection with a Tab character.
 
 
 
Note: The selection always persists in this tool.
 
 
 
====Quote Mail (Ctrl+Q)====
 
 
 
Indents (quotes) each {{defined|line}} of the selection with a {{string|<nowiki>&gt;_</nowiki>}} phrase exactly the same way as a standard mail client would do upon replying to a message.
 
 
 
Note: The selection always persists in this tool.
 
  
 
====Enclose Selection (Alt+Ctrl+E)====
 
====Enclose Selection (Alt+Ctrl+E)====
Line 30: Line 18:
  
 
{{tip}} Note that if you need to enclose entire subsequent lines, it is better to select all of them at once and use {{feature|Indent/Quote Selection...}} tool (hotkey {{hotkey|Alt+Ctrl+Q}}) and then {{feature|Close Lines...}} tool (hotkey {{hotkey|Alt+Ctrl+C}}) instead of selecting each one of them separately and performing the {{feature|Enclose Selection}} again and again.
 
{{tip}} Note that if you need to enclose entire subsequent lines, it is better to select all of them at once and use {{feature|Indent/Quote Selection...}} tool (hotkey {{hotkey|Alt+Ctrl+Q}}) and then {{feature|Close Lines...}} tool (hotkey {{hotkey|Alt+Ctrl+C}}) instead of selecting each one of them separately and performing the {{feature|Enclose Selection}} again and again.
 
====Indent/Quote Selection... (Alt+Ctrl+Q)====
 
   
 
Asks for a {{field|Quote}} phrase to work with and then indents (quotes) the selection with the specified phrase at the beginning of each {{defined|line}}. Optionally, only {{defined|non-empty lines}} can be quoted.
 
 
{{example_start}}Example: {{mycomment|(an e-mail received from a user)}}
 
{{example_body}}<nowiki>----- Original Message -----
 
</nowiki>{{example_select|<nowiki>Great notepad!
 
 
Tabs, you need tabs for multiple documents. Cosmetic, supeficial,........
 
of course. But that's what people are looking for these days.</nowiki>}}
 
{{example_end}}
 
 
{{example_start}}Result, using {{field|Quote}}: {{string|<nowiki>&gt;_</nowiki>}} and {{field|Only non-empty lines}} checked:
 
{{example_body}}<nowiki>----- 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.</nowiki>
 
{{example_end}}
 
 
{{tip}} If you are writting a list (or a table) in an HTML document, you may write all the lines of such a list first without having to bother with all the HTML tags. Then select all the lines, hit this {{feature|Indent/Quote Selection...}} tool (hotkey {{hotkey|Alt+Ctrl+Q}}) and enter phrase like {{string|<nowiki>&lt;LI&gt;</nowiki>}} as the {{field|Quote}} phrase.
 
 
====Close Lines... (Alt+Ctrl+C)====
 
 
Asks for a {{field|Close with}} phrase to work with and then closes each {{defined|line}} of the selection with the specified phrase. Optionally, only {{defined|non-empty lines}} can be closed.
 
 
{{example_start}}Result, using {{field|Close with}}: {{string|<nowiki>&lt;br&gt;</nowiki>}}; see example above:
 
{{example_body}}<nowiki>----- Original Message -----
 
Great notepad!<br>
 
<br>
 
Tabs, you need tabs for multiple documents. Cosmetic, supeficial,........<br>
 
of course. But that's what people are looking for these days.<br></nowiki>
 
{{example_end}}
 
 
{{tip}} As the example above shows, if you are writting an HTML document, you may write all the text of such a document first without having to bother with all the HTML tags. Then select the text, hit this {{feature|Close Lines...}} tool (hotkey {{hotkey|Alt+Ctrl+C}}) and enter whatever phrase is needed after each line (e.g. a {{string|<nowiki>&lt;bt&gt;</nowiki>}} tag).
 
 
{{tip}} According to the tips and examples above, you may simply combine the {{feature|Indent/Quote Selection...}} tool with {{feature|Close Lines...}} tool in order to write paragraphs in an HTML document without having to bother with {{string|<nowiki>&lt;p&gt;</nowiki>}} tags at first. Write all the paragraphs first, each one on a single line (use {{feature|word wrapping}} (hotkey {{hotkey|Ctrl+W}}) in order to see entire paragraphs wrapped into several lines). Then select all the paragraphs and use both {{feature|Indent/Quote Selection...}} and {{feature|Close Lines...}} tools in order to add the {{string|<nowiki>&lt;p&gt;</nowiki>}} and {{string|<nowiki>&lt;/p&gt;</nowiki>}} tags.
 
 
====Unique Lines (Alt+Ctrl+X)====
 
 
Searches the selection for equal {{defined|lines}} and removes all duplicates. The order of the uniqued lines remains unchanged and from each two equal lines, the second one is removed.
 
 
Note: Use {{hotkey|Shift+Alt+Ctrl+X}} hotkey in order to {{defined|ignore case}} when matching duplicates.
 
 
{{example_start}}Example:
 
{{example_body}}{{example_select|<nowiki>how much
 
wood
 
would
 
a woodchuck
 
chuck
 
if
 
a woodchuck
 
could
 
chuck
 
wood</nowiki>}}
 
{{example_end}}
 
 
{{example_start}}Result:
 
{{example_body}}<nowiki>how much
 
wood
 
would
 
a woodchuck
 
chuck
 
if
 
could</nowiki>
 
{{example_end}}
 
 
{{tip}} If you need, for example, a complete word listing of a document, use the {{feature|Extended Replace}} tool in order to replace all the spaces, commas, dots, etc. by new lines. Then use this {{feature|Unique Lines}} tool, which will give you the complete listing of all words.
 
 
====Unique Lines... (Ctrl+Shift+X)====
 
 
Works the same way as the {{feature|Unique Lines}} tool does, but allows more options affecting the behavior of the tool:
 
 
*{{field|All lines}} - identical to the behavior of the Unique Lines tool.
 
*{{field|Only unique lines}} - only lines that does not have duplicates are included in the result.
 
*{{field|Only duplicated lines}} - only lines that have at least one duplicate are included in the result.
 
 
{{example_start}}Result of {{field|Only duplicated lines}}; see example above:
 
{{example_body}}<nowiki>wood
 
a woodchuck
 
chuck
 
</nowiki>
 
{{example_end}}
 
 
The {{field|Count duplicates}} option adds to the result the actual numbers of equal lines. Each resulting line will contain a number of its duplicates, written in brackets before the line.
 
 
{{example_start}}Result of {{field|Count duplicates}}; see example above:
 
{{example_body}}<nowiki>(1) how much
 
(2) wood
 
(1) would
 
(2) a woodchuck
 
(2) chuck
 
(1) if
 
(1) could</nowiki>
 
{{example_end}}
 
 
Additionally, {{field|Ignore case}} option may be specified to {{defined|ignore case}} when matching duplicates. {{field|Leave empty lines}} option may be specified to spare {{defined|empty lines}} from being uniqued to prevent joining of separate {{defined|paragraphs}}.
 
 
====Unindent Selection (Ctrl+Shift+Tab)====
 
 
Removes the first character on each {{defined|line}} of the selection, if the character is a {{defined|white-space}}.
 
 
====Unquote Selection (Ctrl+Shift+Q)====
 
 
Takes the very first character of the selection as a ''quoting character''. Then removes the first character on each {{defined|line}} of the selection, if the character is the ''quoting character''.
 
 
Note: It is very similar to the {{feature|Unindent Selection}} tool, but it is not space-oriented only.
 
  
 
====Compare... (Alt+Ctrl+M)====
 
====Compare... (Alt+Ctrl+M)====

Revision as of 15:08, 10 July 2006

You see work in progress here; this section already reflects future TED Notepad version 5.0.0.13.
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.

Note: This tool was modified since previous versions. Now it does not work with the clipboard any more.

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

Tip: If you have written an HTML document and you need to make several phrases to be bold, e.g. each occurrence of a specific word, then use Find... (hotkey Ctrl+F) to select first such word, hit Enclose Selection (hotkey Alt+Ctrl+E), enter phrases Before: <b> and After: </b> and hit [[Control:Button:Enclose:{{{2}}}|{{{2}}}]] button. The selected word will be enclosed with the bolding tags. Then, use Find Next (hotkey F3) to select all the other occurrences, one by one. Each time hit Last Tool (hotkey Ctrl+L), in order to use Enclose Selection on each of them.

Tip: Note that if you need to enclose entire subsequent lines, it is better to select all of them at once and use Indent/Quote Selection... 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.

Compare... (Alt+Ctrl+M)

Shows the Compare dialog, where two strings can be inserted and compared, optionally ignoring case.

If the two compared strings are not equal, the difference is marked by a selection within the first string and a warning is given. Note: If the strings are equal only up to the length of the first one, the caret is placed to the end of the first one. Nothing is selected.

Note: If the selection is not empty, it is auto-inserted to the edit box of the first string. The same font is used within the Compare dialog, as is specified for the main window.

Statistics... (F9)

Shows the Statistics dialog with a lot of calculated info about the document and the selection. Description of some terms used in the Statistics dialog can be found in the section Appendix.

Note: The calculated Crc32 value is informative only. It may differ from UNICODE to Non-UNICODE versions and from LE to RE clones.