Using Visual Aids in Text View
Text View has multiple visual aids to make the display and editing of text easier. These include:
•End-of-Line and Whitespace Markers
Where applicable, you can toggle or customize the features above from the Text View Settings dialog box. Settings in the Text View Settings dialog box apply to the entire application—not only to the active document.
Text View Settings dialog box
To open the Text View settings dialog box, do one of the following:
•On the Text View menu, select Text View Settings.
•Click the Text View Settings button in the Text toolbar.
Some of the navigation aids can also be toggled from the Text toolbar, the application menu, or keyboard shortcuts.
For reference to all shortcuts applicable in the File Comparison window, see the "Key Map" section of the Text View Settings dialog box illustrated above.
Line numbers are displayed in the line numbers margin, which can be toggled on and off in the Text View Settings dialog box. When a section of text is collapsed, the line numbers of the collapsed text are also hidden. A related command is the Go-to-Line/Character command.
Syntax coloring is applied according to the semantic value of the text. For example, in XML documents, depending on whether the XML node is an element, attribute, content, CDATA section, comment, or processing instruction, the node name (and in some cases the node's content) is colored differently. You can enable or disable syntax coloring for various file extensions (including custom extensions) from the Tools | DiffDog Options menu, File Types tab.
Lines in the document can be separately bookmarked for quick reference and access. If the bookmarks margin is toggled on, bookmarks are displayed in the bookmarks margin; otherwise, bookmarked lines are highlighted in cyan.
The bookmarks margin can be toggled on or off in the Text View Settings dialog box.
You can edit and navigate bookmarks using commands in the Text View menu and Text toolbar. Bookmarks can be inserted with the Text View | Insert/Remove Bookmark command, enabling you to mark a line in the document for reference. A bookmark can be removed by selecting the bookmarked line and then selecting the Text View | Insert/Remove Bookmark command. To navigate through the bookmarks in a document, use the Text View | Next Bookmark and Text View | Previous Bookmark commands. These bookmark commands are also available as icons in the Text toolbar.
Source folding refers to the ability to expand and collapse nodes and is displayed in the source folding margin. The margin can be toggled on and off in the Text View Settings dialog box. To expand or collapse portions of text, click the "+" and "-" nodes at the left side of the window. Any portions of collapsed code are displayed with an ellipsis symbol. To preview the collapsed code without expanding it, move the mouse cursor over the ellipsis. This opens a tooltip that displays the code being previewed, as shown in the image below. Note that, if the previewed text is too big to fit in the tooltip, an additional ellipsis appears at the end of the tooltip.
The Toggle All Folds command in the Text toolbar toggles all nodes together to their expanded or collapsed forms.
Indentation guides are vertical dotted lines that indicate the extent of a line's indentation (see screenshot above). They can be toggled on and off in the Text View Settings dialog box.
End-of-line markers, whitespace markers
End-of-line (EOL) markers and whitespace markers can be toggled on in the Text View Settings dialog box. The screenshot below shows these markers in the document display; each dot represents a whitespace.
Zooming in and out
You can zoom in and out of Text View by scrolling (with the scroll-wheel of the mouse) while keeping the Ctrl key pressed. This enables you to magnify and reduce the size of text in Text View. If you wish to increase the size of fonts, do this in the DiffDog Options dialog box.
Go to line/character
This command in the View menu and Text toolbar enables you to go to a specific line and character in the document text.
The Pretty-Print XML Text command reformats the active XML document in Text View to give a structured display of the document. Each child node is offset from its parent by four space characters.
To pretty-print an XML document, select the Text View | Pretty-Print XML Text menu command, or click the button in the Text toolbar
|Note:||The Pretty-Print XML Text command is not a toggle command. Once the command is executed, the pretty-printed format cannot be undone by clicking the Pretty-Print XML Text command again. To undo the pretty-printed format, use the Undo (Ctrl+Z or Alt+Backspace) command.|
To toggle word wrapping in the currently active document, select the Text View | Word Wrap menu command, or click the button in the Text toolbar.
Start and end tag matching
When you place the cursor inside a start or end tag of a markup element, the corresponding start or end tag is highlighted as well. When you edit the name of an element in a start tag, then the end tag will be automatically edited as well.
When you select text, all matches in the document of the text selection that you make are highlighted automatically. The selection is highlighted in pale blue, and matches are highlighted in pale orange. The selection and its matches are indicated in the scroll bar by gray marker-squares. The current cursor position is given by the blue cursor-marker in the scroll bar.