Vi Key Bindings

Vi emulation mimics the modal behavior of the Vi editor. The Vi scheme (and custom schemes created with Vi emulation) require this emulation in order to assign keystrokes to appropriate actions in the various modes.

Keybinding schemes and Vi emulation are configured in Edit|Preferences|Editor|Keybindings.

Vi Emulation

Komodo emulates the following Vi modes:

  • Normal: navigation and editing.

    When you open a file in Komodo with the Vi scheme enabled, you start off in command mode. Keystrokes in this mode control movement, deletion, cutting, pasting and other standard editing commands that are generally mapped to Ctrl and Alt key combinations in other schemes.

  • Input: entering text.

    Hitting an "input" command key in Normal mode (i.e. 'i' to insert, 'a' to append, or 'o' to open a new line and insert) puts the editor into Input mode. Keystrokes in this mode enter text. Use the 'Esc' key to exit into Normal mode.

  • Visual: visual selection of text with navigation keystrokes.

    Similar to Vim's visual modes. Entering 'v' enables selection by character, 'V' enables linewise selection, and 'Ctrl'+'v' enables blockwise selection. Navigation keystrokes within these modes expand and contract the selection area. Use the 'Esc' key to exit into Normal mode.

  • Command-line: running vi/ex commands.

    In Normal mode, entering ':' opens a text box for entering Vi commands. Only a small subset of Vi commands have been implemented in the default Vi scheme, however you can add additional commands by creating a Toolbox folder named Vi Commands, then creating Macros with the name of the desired command. The macro is executed when you type it's name in the Vi command text box.

Vi Scheme

The default Vi scheme is based on the Default scheme (which varies slightly between platforms) and includes all Default keybindings which do not conflict with those used in Vi emulation. To view the list of key bindings for your current scheme, select Help|List Key Bindings. The following are key bindings which are unique to the Vi scheme.

Vi key bindings

Cancel

Ctrl+[

Esc

Cut One Character

x

Cut One Character to Left

X

Cut to End of Line and Enter Insert Mode

C

Delete the Current Character and Enter Insert Mode

s

Deletes from cursor to end of line.

D

Enter Insert Mode

i

Enter Insert Mode after the Cursor Position

a

Enter Insert Mode at Start of the Line

I

Enter Insert mode at the End of the Current Line

A

Enter command mode

:

Enter visual block mode

Ctrl+V

Enter visual character mode

v

Enter visual line mode

V

Go to Next Line

j

Go to Previous Line

k

Goto Line

G

Join current and next lines

J

Move Left One Character

h

Move One Word Left

b

Move Right One Character

Space

l

Move To End of Word To Right

e

Move To Start of Word To Right

w

Move one page down

Ctrl+F

Move one page up

Ctrl+B

Move one word left, past any punctuation

B

Move one word right, past any punctuation

W

Move to Beginning of Line (first visible char/first column)

^

Move to Beginning of the Current Line

|

0

Move to Beginning of the Previous Line

-

Move to End of Current Line

$

Move to end of word to the right, past any punctuation

E

Move to the Beginning of the Paragraph

{

Move to the Beginning of the Section

[, [

Move to the Beginning of the Sentence

(

Move to the Bottom of the Screen

L

Move to the Center of the Screen

M

Move to the End of the Paragraph

}

Move to the End of the Section

], ]

Move to the End of the Sentence

)

Move to the Top of the Screen

H

New Line Starting After the Current Line

o

New Line Starting Before the Current Line

O

Paste

P

Paste After

p

Redo

Ctrl+R

Repeat the last command again

.

Replace characters with the ones that are typed

R

Replace the current char with the next typed character

r

Scroll One Line Down

Ctrl+E

Scroll One Line Up

Ctrl+P

Search for the Next Occurance of the Word at the Current Cursor Position

*

Search for the Previous Occurance of the Word at the Current Cursor Position

#

Start Change Text Operation

c

Start Delete Text Operation

d

Start Yank Text Operation

y

Swap the current character's case.

~

Undo

u

Enter Search Backwards

?

Enter Search Forward

/

Find Next Pattern

n

Find Previous Pattern

N

Find the Character Typed, After Cursor in Current Line

f

Find the Character Typed, Before Cursor in Current Line

F

Decrease Line Indent

<, <

Increase Line Indent

>, >

Jump to Matching Brace

%