Difference between revisions of "Text tools"

From TED Notepad
Line 25: Line 25:
 
The tag may be {{field|Empty}} which means that only the starting tag is generated with slash at its end according to XML specification (e.g. <nowiki><br /></nowiki>). In this case, if a selection is found, the tag is placed at the end of the selection.
 
The tag may be {{field|Empty}} which means that only the starting tag is generated with slash at its end according to XML specification (e.g. <nowiki><br /></nowiki>). In this case, if a selection is found, the tag is placed at the end of the selection.
  
Note: It is usually profitable to turn on the {{field|Persistent selections in Tools}} setting in the {{dialog|Settings dialog}}. See chapter [[Settings dialog]].
+
Note: It is usually profitable to turn on the {{field|Persistent selections in Tools}} setting in the {{dialog|Settings dialog}}. See chapter [[General page]] of the {{dialog|Settings}} dialog.
  
 
{{example_start}}Example:
 
{{example_start}}Example:

Revision as of 14:48, 17 April 2007

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

XML/HTML Tag (Ctrl+Shift+H)

Asks for a Tag name and for its Attributes. Then encloses the selection with generated XML/HTML tag. If no selection is found, the caret is placed between the two generated strings: the starting tag and the ending tag.

The tag may be Empty which means that only the starting tag is generated with slash at its end according to XML specification (e.g. <br />). In this case, if a selection is found, the tag is placed at the end of the selection.

Note: It is usually profitable to turn on the Persistent selections in Tools setting in the Settings dialog. See chapter General page of the Settings dialog.

Example:
There is no place like 127.0.0.1!
Result, using Tag name: a and Attributes: href="http://127.0.0.1/":
There is no place like <a href="http://127.0.0.1/">127.0.0.1</a>!

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.