Editing Text

WebScripter offers numerous extensions to common text editing and other options to help you code faster.

Topics

4.0 Auto-Complete

Auto-completion reduces the time you spend typing or trying to remember commonly used keywords and symbols. Auto-complete is aware of context so, for example, in an HTML file the word "table" will not appear in the list unless you are editing inside a tag.

In WebScripter auto-complete is extra powerful because it remembers symbols (functions, classes, methods, variables and constants) in your project from compiling and will help you complete the names that you have forgotten.


Editing with auto-completion.

4.1 Auto-Pair

WebScripter helps you auto-pair characters which are usually typed in pairs, such as ( and ), { and }, " and " and others.

Auto-completed pairs can be deleted together if the cursor is between the matching characters when the delete key is pressed.

Text can be wrapped by a character pair if the range is first selected then the opening character in the pair typed.

4.2 HTML Shortcuts

Because HTML is common to web page development in all languages WebScripter offers some built-in shortcuts for editing tags.

  1. Auto-Close Tags. Tags can be closed automatically by pressing the return key while the cursor is behind the > character (end of the tag name) in the open tag.
  2. Delete Tag Pairs. If the cursor is between 2 tags with no additional text pressing option-delete will delete the pair.

4.3 Jumping Lines

A simple but useful feature is known as "jumping lines". By pressing option-return WebScripter will create a new line on the next and indent to the proper level. This allows you to create new lines easier without having to find the start or end of another line with the cursor.

4.4 Contextual Menu

You can invoke a contextual menu while editing which contains common features for quick access. A typical use of the contextual menu is invoking macros on the selected text.

The contextual menu can be invoked by:

  • Right-clicking.
  • Control-clicking.
  • Show Contextual Menu command (command-shift-C) in the Editor menu

The contextual menu contains:

  • Symbol Navigation. If the menu is invoked and the selected word is a symbol you can click the [Go To ... in ...] item and the line the symbol was declared will be selected and/or the file it belongs to opened.
  • Macros. A list of available macros. Note that when inserting macros from the contextual menu the selected text in the document will passed as the $1 variable to the macro.
  • Functions. All the declared functions, classes and methods in the file.
  • Headers. All the files which are imported into the file.
  • Syntax Mode.
  • Edit commands.


Using the contextual menu during editing.

4.6 Syntax Mode

The syntax mode is the language that the file uses during parsing (coloring text and gathering symbols). Normally WebScripter will assume the language by looking at the files extension but if that information is not available or wish to override it you can manually change the syntax mode.

You can change the syntax mode 2 ways:

  • Clicking the syntax mode button in the right-hand side of the editor toolbar.
  • In the contextual menu then select a language under the Mode sub-menu.

4.7 Editing Preferences

Certain features which pertain to editing can be turned on or off in the application preferences.

Features including:

  • Code Sense. Code sense is the system which controls auto-pairing, HTML editing shortcuts, auto-indent and other "extra" editing features. Turn this off if don't want WebScripter interfering with your typing.
  • Show Gutter. Turns the gutter (the bar containing line numbers) on or off.
  • Wrap Lines.
  • Multiple Undo. If turned off only 1 level of undo will be supported.
  • Auto-Complete.
  • Completion Delay. The delay in seconds until the completion window is displayed during typing.


General application preferences.