The Edit Menu

The Edit menu contains 13 commands:

Undo

The Undo command reverses the effects of the most recent editing operation.

Redo

The Redo command reverses the effects of the most recent Undo command.

Cut

The Cut command removes the selection from the active window and places it on the Windows clipboard.

Copy

The Copy command places the selection from the active window  on the Windows clipboard.

Paste

The Paste command replaces the selection in the active window with the current contents of the Windows clipboard.

Delete

The Delete command deletes the selection from the active window.

Select All

The Select All command selects the entire contents of the active window.

Find/Replace

The Find/Replace command opens the Find and Replace dialog box:

Go to Line

The Go to Line command opens the Go To Line dialog box:

Enter a line number and click OK to position the cursor on that line in the active window.

If the specified line is in a collapsed block, the block will be expanded.

Advanced

The Advanced command displays a submenu with nine commands:

Advanced > Make Uppercase

The Make Uppercase command converts the selection to all uppercase text.

Advanced > Make Lowercase

The Make Lowercase command converts the selection to all lowercase text.

Advanced > Delete Horizontal White Space

The Delete Horizontal White Space command removes any extra white space in the selection, reducing all white space to a single space.

Advanced > View White Space

The View White Space command turns on visible markers for tab and space characters. Tabs are displayed as arrows, and spaces are displayed as centered dots:

Selecting this command a second time turns visible markers off.

Advanced > Word Wrap

The Word Wrap command inserts soft returns into the active window so that all code is displayed in the current window width. Selecting this command a second time removes the soft returns.

Advanced > Incremental Search

The Incremental Search command enters incremental search mode, searching from the cursor position to the end of the file.

Advanced > Backward Incremental Search

The Backward Incremental Search command enters incremental search mode, searching from the cursor position to the start of the file.

Advanced > Increase Line Indent

The Increase Line Indent command inserts a tab character at the start of the selection.

Advanced > Decrease Line Indent

The Decrease Line Indent command removes a tab character from the start of the selection.

Bookmarks

The Bookmarks command displays a submenu with four commands:

Bookmarks > Toggle Bookmark

The Toggle Bookmark command inserts a visible bookmark to the left of the current line:

If the current line already has a bookmark, the Toggle Bookmark command removes the bookmark.

Bookmarks are not saved with CodeSmith templates. When you close a template, all bookmarks are automatically cleared.

Bookmarks > Next Bookmark

The Next Bookmark command moves the cursor to the start of the next line in the current file that is marked with a bookmark. The search "loops around" to the top of the file if it reaches the bottom of the file.

Bookmarks > Previous Bookmark

The Previous Bookmark command moves the cursor to the start of the previous line in the current file that is marked with a bookmark. The search "loops around" to the bottom of the file if it reaches the top of the file.

Bookmarks > Clear Bookmarks

The Clear Bookmarks command removes all bookmarks from the current file.

Outlining

The Outlining command displays a submenu with four commands:

Outlining > Toggle Outlining Expansion

The Toggle Outlining Expansion command expands the current outline block if it is collapsed, and collapses the current outline block if it is expanded. If the cursor is not within an outline block this command has no effect.

Outlining > Toggle All Outlining

The Toggle All Outlining command alternately expands and collapses all outline blocks in the current template.

Outlining > Stop Outlining

The Stop Outlining command turns off the outlining features of the CodeSmith Studio editor. After you select this command, it will change to Start Automatic Outlining. Select the Start Automatic Outlining command to re-enable the outlining features.

Outlining > Toggle Template Code Expansion

The Toggle Template Code Expansion command alternatively expands and collapses CodeSmith directives into single-line outlines.

Insert Content

The Insert Content command displays a submenu with 11 commands designed to help you write templates more quickly:

Insert Content > Code Block

The Code Block command inserts <%  %> markers to hold code to be executed by CodeSmith.

Insert Content > Inverted Code Block

The Inverted Code Block command inserts %>  <% markers. This is useful when you need to insert literal output in the middle of an existing code block.

Insert Content > Write Block

The Write Block command inserts <%=  %> markers to write the value of a property to the template output.

Insert Content > Script Block

The Script Block command inserts an empty script block:

<script runat="template"> 
</script>

Insert Content > Comment Block

The Comment Block command adds <%-  -%> markers around the current selection to turn it into a comment.

Insert Content > Code Template Directive

The Code Template Directive command inserts an empty CodeTemplate directive.

Insert Content > Property Directive

The Property Directive command inserts an empty Property directive.

Insert Content > Import Directive

The Import Directive command inserts an empty Import directive

Insert Content > Assembly Directive

The Assembly Directive command inserts an empty Assembly directive.

Insert Content > XmlProperty Directive

The XmlProperty Directive command inserts an empty XmlProperty directive.

Insert Content > Register Directive

The Register Directive command inserts an empty Register directive.

This feature is only available in the Professional Edition of CodeSmith.