Editing Queries, Scripts and Comments

Editing text within queries, scripts, and comments uses similar commands.

 

Click and drag

Clicking and dragging over text highlights that text.

Ctrl-A

Highlight all.

Ctrl-C

Copy to the clipboard.

Ctrl-X

Cut to the clipboard.

Ctrl-V

Paste from the clipboard.

Ctrl-K

Comment the line.  (Queries and Scripts only)  Edit - Advanced - Comment Lines

Shift-Ctrl-K

Uncomment the line.  (Queries and Scripts only)  Edit - Advanced - Uncomment Lines

Ctrl-T

Increase line indent.  Edit - Advanced - Increase Line Indent

Shift-Ctrl-T

Decrease line indent.  Edit - Advanced - Decrease Line Indent

Ctrl-U

Make highlighted text lower case.  Edit - Advanced - Make Lower Case

Shift-Ctrl-U

Make highlighted text upper case.  Edit - Advanced - Make Upper Case

Arrow keys

Move the cursor in the direction of the arrow.

Page Up / Down

Move the cursor one window up or down.

Home

Move the cursor to the left-most character of the current line.

End

Move the cursor to the right-most character of the current line.

Ctrl-Home

Move the cursor  to the first line.

Ctrl-End

Move the cursor to the last line.

Ctrl-F

Edit - Find

Shift-F3

Edit - Find Previous

F3

Edit - Find Next

Ctrl-H

Edit - Replace

Ctrl-]

Move cursor to matching bracket. Available when cursor is next to a bracket.  <>, [], (), {} match across lines.   #, ' and " match within same line only.  

Shift-Ctrl-]

Move cursor to matching bracket and select all in between, inclusive.  Available when cursor is next to a bracket.  <>, [], (), {} match across lines.  #,  ' and " match within same line only.

 

Command Window - SQL Query Builder

 Drag and Drop

Add the name of a table or drawing and all fields to the Tables pane of the query builder.

(filter boxes)

Show only those items that contain text matching the text in the filter box, case not significant.

Double-click

Add this item to the query text, replacing any highlighted text.

Right-click - Insert Definition

When right-clicking a table name, insert SQL to create this table in the query.

Right-click - Insert Field List

When right-clicking a table name, insert a list of all fields in the table into the query.

Examples

Symmetric brackets are those where the same character is used at the beginning and end of bracketed text, as with a double quote " character or single quote ' character, or the # character used to bracket dates in SQL.   Asymmetric brackets are those where different characters are used at the beginning and end of enclosed text, as in < >, [ ], (  ), and { }.  

 

A Ctrl-] keyboard command matches asymmetric brackets across multiple lines.   Ctrl-] matches symmetric brackets, #,  " and ', only within the same line.  If there is no matching bracket character, nothing happens.

Match Asymmetric Brackets

Asymmetric brackets are < >, [ ], (  ), and { }.  

eg_comments_match_bracket01_01.png

With the cursor (indicated by a magenta arrow) on a curly { bracket character we press Ctrl-].

 

eg_comments_match_bracket01_02.png

The cursor immediately jumps to the next, matching, curly } bracket, even if it is on a different line.

 

Pressing Ctrl-] again would jump the cursor back to the first, curly { bracket character.

 

Match Symmetric Brackets

Symmetric bracket characters are #, single quote ' and double quote " characters. 

 

eg_comments_match_bracket01_03.png

 

With the cursor (indicated by a magenta arrow) on a double quote " bracket character we press Ctrl-].

 

eg_comments_match_bracket01_04.png

 

The cursor immediately jumps to the next, matching, double quote " bracket character, but only if it is on the same line.   Pressing Ctrl-] again would jump the cursor back to the first, double quote " bracket character.

 

Match and Highlight All Between

Adding a Shift key matches and selects everything in between.

 

eg_comments_match_bracket01_05.png

 

With the cursor (indicated by a magenta arrow) on a double quote " bracket character we press Shift-Ctrl-].

 

eg_comments_match_bracket01_06.png

 

The cursor immediately jumps to the next, matching, double quote " bracket character, but only if it is on the same line.   Both double quote " bracket characters as well as all characters in between have been highlighted.

 

 

Bracket matching using Ctrl-] also works when the cursor is located just to the right of the initial bracket.

 

eg_comments_match_bracket01_07.png

 

With the cursor (indicated by a magenta arrow) located just to the right of a curly { bracket character we press Shift-Ctrl-].

 

eg_comments_match_bracket01_08.png

 

The cursor immediately jumps to the next, next, matching, curly } bracket character.  Both curly bracket characters as well as all characters in between have been highlighted.

 

See Also

Queries

 

Scripts

 

Command Window

 

Query Builder

 

Example: Create and Run a Query -  See how the different parts of a command window operate when creating and running SQL queries.   Includes use of the Log tab as well as the ?expression and !fullfetch commands.

 

Example: Run JavaScript in the Command Window - How to run a simple V8 JavaScript script in the Command window.