Using the ttIsql 'editline' Feature for Linux and UNIX Only

On Linux and UNIX systems, you can use the 'editline' library to set up emacs (default) or vi bindings that enable you to scroll through previous ttIsql commands, as well as edit and resubmit them.

This feature is not available or needed on Windows.

To disable the 'editline' feature in ttIsql, use the ttIsql command set editline off.

The set up and keystroke information is described for each type of editor:

Emacs Binding

To use the emacs binding, create a file ~/.editrc and put "bind" on the last line of the file, run ttIsql. The editline lib prints the current bindings.

The keystrokes when using ttIsql with the emacs binding are:

Keystroke Action

<Left-Arrow>

Move the insertion point left. Back up.

<Right-Arrow>

Move the insertion point right. Move forward.

<Up-Arrow>

Scroll to the command prior to the one being displayed. Places the cursor at the end of the line.

<Down-Arrow>

Scroll to a more recent command history item and put the cursor at the end of the line.

<Ctrl-A>

Move the insertion point to the beginning of the line.

<Ctrl-E>

Move the insertion point to the end of the line.

<Ctrl-K>

Save and erase the characters on the command line from the current position to the end of the line.

<Ctrl-Y>

"Yank" (Restore) the characters previously saved and insert them at the current insertion point.

<Ctrl-F>

Forward char - move forward 1 (see Right Arrow).

<Ctrl-B>

Backward char - move back 1 (see Left Arrow).

<Ctrl-P>

Previous History (see Up Arrow).

<Ctrl-N>

Next History (see up Down Arrow).

<ESC-k> or <Ctrl-Up-Arrow>

Scroll up one line to edit within a multiple line PL/SQL block.

<ESC-j> or <Ctrl-Down-Arrow>

Scroll down one line to edit within a multiple line PL/SQL block.

vi Binding

To use the vi bindings, create a file ${HOME}/.editrc and put "bind -v" in the file, run ttIsql.

To get the current settings, create a file ${HOME}/.editrc and put "bind" on the last line of the file. When you run ttIsql, the editline lib prints the current bindings.

The keystrokes when using ttIsql with the vi binding are:

Keystroke Action

<Left-Arrow>, h

Move the insertion point left (back up).

<Right-Arrow>, l

Move the insertion point right (forward).

<Up-Arrow>, k

Scroll to the prior command in the history and put the cursor at the end of the line.

<Down-Arrow>, j

Scroll to the next command in the history and put the cursor at the end of the line.

ESC

Vi Command mode.

0, $

Move the insertion point to the beginning of the line, Move to end of the line.

i, I

Insert mode, Insert mode at beginning of the line.

a, A

Add ("Insert after") mode, Append at end of line

R

Replace mode.

C

Change to end of line.

B

Move to previous word.

e

Move to end of word.

<Ctrl-P>

Previous History (see Up Arrow).

<Ctrl-N>

Next History (see up Down Arrow).