StudioEditor

Code Completion

Code completion allows you to type a few characters and then display a list of context-sensitive possibilities to complete the text you are typing. For example, in the ksql Editor code completion brings up a list of possible tables or columns that can be used to complete the expression. Code completion can be triggered by pressing [CTRL+SPACE] or by typing a hotchar or keyword, such as '.' .

Word Matching

Word matching is a dynamic approach to entering frequently used words. After you type the first part (the prefix) of a desired word, the Editor can generate the rest of the word based on a list of all words in the document with the same prefix. You can search through the matching words in reverse [CTRL+K] or forward [CTRL+L] direction. If your first match does not generate the desired word, you can press Ctrl-K or Ctrl-L multiple times to find additional matches.

Macro Recording

You can record a sequence of actions performed in the Editor and assign them a shortcut. Type [CTRL+J S] (type Ctrl-j, then type s) to start recording, enter any sequence of keystrokes in the Editor, and then type [CTRL+J E] to stop macro recording. A dialog box is displayed where you can edit the just-recorded macro and assign it a keyboard shortcut. Replay the macro using the shortcut you specified.

Standard navigation and text selection shortcuts

When typing in the Editor, you have access to a wide variety of commonly-used shortcuts to help you navigate and select specific blocks of text in your files. These include:

 

  • SHIFT+RIGHT - select the character to the right of the insertion point
  • SHIFT+LEFT - select the character to the left of the insertion point
  • CTRL+RIGHT - move the insertion point one word to the right
  • CTRL+LEFT - move the insertion point one word to the left
  • CTRL+SHIFT+RIGHT - select the word to the right of the insertion point
  • CTRL+SHIFT+LEFT - select the word to the left of the insertion point
  • SHIFT+PgDown - select the page-long block of text beginning with the insertion point
  • SHIFT+PgUp - select the page-long block of text ending with the insertion point

Text scrolling shortcuts

These shortcuts enable you to scroll the text without moving the insertion point:

  • CTRL+UP - Scroll the text one line up while holding the insertion point in the same position.
  • CTRL+DOWN - Scroll the text one line down while holding the insertion point in the same position.
  • ALT+u then t - scrolls the text up so that the insertion point moves to the top of the window while remaining at the same point in the text.
  • ALT+u then m - scrolls the text so that the insertion point moves to the middle of the window while remaining at the same point in the text.
  • ALT+u then b - scrolls the text down so that the insertion point moves to the middle of the window while remaining at the same point in the text.
  • ALT+SHIFT+t - move the insertion point to the top of the window.
  • ALT+SHIFT+m - move the insertion point to the middle of the window.
  • ALT+SHIFT+b - move the insertion point to the bottom of the window.

Jump list

You can move through a file or files by using keyboard shortcuts to jump straight to parts of the file where you have been previously working.

The Editor maintains a jump list where each entry represents a point in a file where you have added or deleted text or which you have navigated to with the find function. You can use the following keyboard shortcuts to navigate to points in your files according to the jump list:

  • ALT+k - go to the previous entry in the jump list.
  • ALT+l - go to the next entry in the jump list
  • ALT+SHIFT+k - go to the previous jump list entry not in the current file
  • ALT+SHIFT+l - go to the next jump list entry not in the current file

For example, if you are editing line 7 of a file, then you scroll to line 100 and enter text, you can press ALT+k to go back to line 7 and then ALT+l to go back to line 100.

 

Working with braces

In the Editor window, whenever the insertion point is immediately after a brace, bracket, or parenthesis (either opening or closing), the matching brace/bracket/parenthesis is highlighted.

When the insertion point is positioned after a brace, bracket, or parenthesis, you can also press CTRL+[ to move to the matching brace. If you press CTRL+SHIFT+[, the text within the braces is selected.

 

Find and replace

To find or replace text in a file open in the Editor window, press CTRL+f to bring up the Find dialog box, or press CTRL+r to bring up the Replace dialog box. The Find/Replace dialog box gives you checkboxes which enable you to choose any combination of the following options:

  • Highlight Search - to highlight all occurrences of the search text in the file
  • Incremental Search - for the search engine to try to find the text as you type (without having to press the Find button)
  • Match Case - to limit the search to text that has the same capitalization
  • Smart Case - to limit the search to text that has the same capitalization when at least one character of the search text is upper case
  • Match Whole Words Only - to match the search text only to whole words in the file
  • Backward Search - to search in reverse order in the file
  • Wrap Search - to continue the search at the beginning (or end) of the file

You can also search using the following keyboard shortcuts:

  • F3 - to find the next occurrence of the search text
  • SHIFT+F3 - to find the previous occurrence of the search text
  • CTRL+F3 - to find the next occurrence of the selected string or, if nothing is selected, the word that the insertion point is in
  • ALT+SHIFT+h - to switch the highlight search feature on or off


Navigation shortcuts

Shortcuts with standard navigation keys

Keyboard shortcut
with no selected text
with selected text
RIGHT Move the insertion point one character to the right. Deselect the text and move the insertion point one character to the right.
LEFT Move the insertion point one character to the left. Deselect the text and move the insertion point one character to the left.
DOWN Move the insertion point to the next line Deselect the text and move the insertion point to the next line.
UP Move the insertion point to the previous line. Deselect the text and move the insertion point to the previous line.
SHIFT+RIGHT Select the character to the right of the insertion point. Extend the selection one character to the right.
SHIFT+LEFT Select the character to the left of the insertion point. Extend the selection one character to the left.
SHIFT+DOWN Create a text selection and extend it to the next line. Extend the selection to the next line.
SHIFT+UP Create a text selection and extend it to the previous line. Extend the selection to the previous line.
CTRL+RIGHT Move the insertion point one word to the right. Deselect the text and move the insertion point one word to the right.
CTRL+LEFT Move the insertion point one word to the left.
Deselect the text and move the insertion point one word to the left.
CTRL+SHIFT+RIGHT Create a text selection and extend it one word to the right. Extend the selection one word to the right.
CTRL+SHIFT+LEFT Create a text selection and extend it one word to the left. Extend the selection one word to the left.
PgDown Move the insertion point one page down. Deselect the text and move the insertion point one page down.
PgUp Move the insertion point one page up. Deselect the text and move the insertion point one page up.
SHIFT+ PgDown Create a text selection and extend it one page down. Extend the selection one page down.
SHIFT+PgUp Create a text selection and extend it one page up. Extend the selection one page up.
HOME Move the insertion point to the beginning of the line. Deselect the text and move the insertion point to the beginning of the line.
END Move the insertion point to the end of the line. Deselect the text and move the insertion point to the end of the line.
SHIFT+HOME Create a text selection and extend it to the beginning of the line. Extend the selection to the beginning of the line.
SHIFT+END Create a text selection and extend it to the end of the line. Extend the selection to the end of the line.
CTRL+HOME Move the insertion point to the beginning of the document. Deselect the text and move the insertion point to the beginning of the document.
CTRL+END Move the insertion point to the end of the document. Deselect the text and move the insertion point to the end of the document.
CTRL+SHIFT+HOME Create a text selection and extend it to the beginning of the document. Extend the selection to the beginning of the document.
CTRL+SHIFT+END Create a text selection and extend it to the end of the document. Extend the selection to the end of the document.
ALT+u then e Move the insertion point to the end of the current word. Move the insertion point to the end of the last word in the selection.

Insertion point/screen position shortcuts

Press
To
CTRL+UP Scroll the text one line up while holding the insertion point in the same position.
CTRL+DOWN Scroll the text one line down while holding the insertion point in the same position.
ALT+u then t Scroll the text up so that the insertion point moves to the top of the window while remaining at the same point in the text.
ALT+u then m Scroll the text so that the insertion point moves to the middle of the window while remaining at the same point in the text.
ALT+u then b Scroll the text down so that the insertion point moves to the bottom of the window while remaining at the same point in the text.
SHIFT+ALT+t Move the insertion point to the top of the window.
SHIFT+ALT+m Move the insertion point to the middle of the window.
SHIFT+ALT+b Move the insertion point to the bottom of the window.

Jump list shortcuts

Press
To
ALT+k Go to previous entry in the jump list.
ALT+l Go to next entry in the jump list.
SHIFT+ALT+k Go to the previous jump list entry not in the same file.
SHIFT+ALT+l Go to the next jump list entry not in the same file.


Miscellaneous navigation shortcuts

Press
To
F2 Go to next bookmark.
CTRL+F2 Toggle bookmark.
CTRL+[ Find matching bracket.
CTRL+SHIFT+[ Select block between current bracket and matching one.

Find shortcuts

Keyboard Shortcut
With no selected text
With selected text
CTRL+f Show Find dialog. Show Find dialog and show selected text as the text to find.
CTRL+h Show Replace dialog. Show Replace dialog and show selected text as the text to find.
F3 Search for the next occurrence.  
SHIFT+F3 Search for the previous occurrence.  
CTRL+F3 Search for the next occurrence of the word that the insertion point is on. Search for the next occurrence of the selected text.
ALT+SHIFT+h Switch highlight search on or off.  
CTRL+g Show Goto Line dialog.