Title

vi Bindings

Note: I haven't yet written a real version of this document. In lieu of that, what follows is a listing of the vi keyboard editing bindings, converted mechanically from the tables in the code.

Text Windows

Command Mode

Control-slash - select_all

Control-backslash - clear_selection

Delete - vi:left

BackSpace - vi:left

space - vi:right

minus - vi:minus

plus - vi:plus

Return - vi:plus

Up - vi:up

Down - vi:down

Left - vi:left

Right - vi:right

Control-p - vi:up

Control-n - vi:down

k - vi:up

j - vi:down

h - vi:left

l - vi:right

Control-k - vi:up

Control-j - vi:down

Control-h - vi:left

Control-l - vi:right

Control-b - scroll_up

Control-f - scroll_down

x - delete_right

X - delete_left

b - word_left

B - word_left

e - vi:word_end

w - word_right

W - word_right

G - eof

i - vi:insert

I - vi:Insert

a - vi:append

A - vi:Append

o - vi:open

O - vi:Open

d - new_mode vi-delete

c - new_mode vi-change

D - vi:d-eol

C - vi:c-eol

Home - bol

End - eol

asciicircum - vi:bol

dollar - vi:eol

Next - scroll_down

Prior - scroll_up

d - vi:dd

w - vi:dw

W - vi:dw

dollar - vi:d-eol

c - vi:cd

w - vi:cw

W - vi:cw

dollar - vi:c-eol

Escape - vi:clear_count

Control-bracketleft - vi:clear_count

0-9 - continue_number

Insert Mode

Delete - delete_left

BackSpace - delete_left

Return - insert_newline

Control-i - self_insert

Control-j - self_insert

Control-h - delete_left

Control-w - delete_left_word

Control-u - vi:delete_left_line

Escape - vi:command

Control-bracketleft - vi:command

Control-v - new_mode vi-literal

Text Entry Fields

Text entry fields, unlike multi­line text windows, start off in insert mode; you can press Escape to get to command mode.

Insert Mode

Control-slash - select_all

Control-backslash - clear_selection

Delete - delete_left

BackSpace - delete_left

Control-i - self_insert

Control-j - self_insert

Control-h - delete_left

Control-w - delete_word_left

Control-u - vi:delete_left_line

Escape - vi:command

Control-bracketleft - vi:command

Control-v - new_mode vi-literal

Command Mode

Control-slash - select_all

Control-backslash - clear_selection

Delete - left

BackSpace - left

space - right

Left - left

Right - right

h - left

l - right

Control-h - left

Control-l - right

x - delete_right

X - delete_left

b - word_left

B - word_left

w - word_right

W - word_right

i - vi:insert

a - vi:append

I - vi:insert-bol

A - vi:append-eol

asciicircum - bol

dollar - vi:eol

Home - bol

End - vi:eol

Bugs

* The circumflex doesn't work properly in entry widgets.

* The vi bindings don't distinguish between vi's two notions of a word (contiguous alphanumerics vs. contiguous non­blank characters).

See Also

Mouse Bindings

Emacs Bindings

Basic Bindings

Compose­Key Combinations