Other Editor Features

Index of All Documentation » Wing Pro Reference Manual » Source Code Editor »


Show Line Numbers

To show and hide line numbers on the editor, use the Show Line Numbers and Hide Line Numbers items in the Edit menu.

Block Commenting

Use Toggle Block Comment in the Source menu to comment out the selected lines of code in the current editor. Selecting the command a second time will return the lines to their former uncommented state.

For Python files, the type of commenting used with this feature is configured with the Editor > Block Comment Style preference. Indented block commenting styles tend to work better when editing code around commented out lines.

Line Editing

The Line Editing sub-menu of the Source menu provides some commands for quickly operating on lines of code:

New Line Above creates a new blank line above the current line, auto-indents, and places the caret at the start of the new line.

New Line Below works the same way but places the new line below the current line.

Duplicate Lines Above duplicates the current lines or lines above the current selection. The caret or selection is left unchanged.

Duplicate Lines Below works the same way but the lines are placed below the current selection.

Move Lines Up moves the current line or lines upward one line.

Move Lines Down moves the current line or lines downward one line.

Delete Lines deletes all of the current line or lines, even if the selection does not span whole lines.

Swap Lines swaps the current line, or the line at the start of the selection, and the next line.

Enclose

The Enclose sub-menu of the Source menu provides commands to enclose the current selection with (), [], {}, '', "", or <>. If there is no selection, the operation is applied to the text between the caret and the end of the line.

Changing Case

The Change Case sub-menu of the Source menu provides commands to convert the case of the current selection to UPPER CASE, lower case, or Title Case.

Toggle Symbol Case in the same menu converts the current symbol between my_symbol_name, mySymbolName, and MySymbolName form. To convert all occurrences of a symbol, use the items in the Refactor menu instead.

Zooming In and Out

The editor font size can be increased and decreased temporarily from the Zoom sub-menu of the Edit menu.

If the Editor > Enable Font Size Zooming preference is enabled, zooming the editor can also be accomplished by holding down the Ctrl key (or Command on macOS) while operating the mouse wheel or track pad.

Reset Zoom in the Edit > Zoom menu returns the font size to the original.

Brace Matching

Wing highlights matching braces in green when the cursor is adjacent to a brace. Mismatched braces are highlighted in red.

You can cause Wing to select the entire contents of the innermost brace pair from the current cursor position with Match Braces in the Source menu.

Parenthesis, square brackets, and curly braces are matched in all files. Angle brackets (< and >) are matched only in HTML and XML files.

Zip and Egg Support

Source files that are stored in .zip or .egg files may be loaded into the editor as read-only files, during stepping in the debugger, for goto-definition, and as otherwise needed. However Wing is unable to write to a file within a .zip or .egg file.

To open a file through the open file dialog, specify the name of the .zip or .egg file and add a / followed by the name of the file to open.