diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2011-08-16 09:47:18 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2011-08-16 09:47:18 +0000 |
commit | f95f792ddf208e24e1f979b1bf5d373a8052af68 (patch) | |
tree | a02ca48d00421b1178936b16964c4231bb9b05b1 /mode-key.c | |
parent | 2fc84c7c34f599f913109c94f85eb682138a64ec (diff) |
Add up/down/left/right keys in vi edit mode. From "livibetter" SF bug
Diffstat (limited to 'mode-key.c')
-rw-r--r-- | mode-key.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -126,12 +126,16 @@ const struct mode_key_cmdstr mode_key_cmdstr_copy[] = { const struct mode_key_entry mode_key_vi_edit[] = { { '\003' /* C-c */, 0, MODEKEYEDIT_CANCEL }, { '\010' /* C-h */, 0, MODEKEYEDIT_BACKSPACE }, - { '\025' /* C-u */, 0, MODEKEYEDIT_DELETELINE }, { '\011' /* Tab */, 0, MODEKEYEDIT_COMPLETE }, + { '\025' /* C-u */, 0, MODEKEYEDIT_DELETELINE }, { '\033' /* Escape */, 0, MODEKEYEDIT_SWITCHMODE }, { '\r', 0, MODEKEYEDIT_ENTER }, { KEYC_BSPACE, 0, MODEKEYEDIT_BACKSPACE }, { KEYC_DC, 0, MODEKEYEDIT_DELETE }, + { KEYC_DOWN, 0, MODEKEYEDIT_HISTORYDOWN }, + { KEYC_LEFT, 0, MODEKEYEDIT_CURSORLEFT }, + { KEYC_RIGHT, 0, MODEKEYEDIT_CURSORRIGHT }, + { KEYC_UP, 0, MODEKEYEDIT_HISTORYUP }, { '$', 1, MODEKEYEDIT_ENDOFLINE }, { '0', 1, MODEKEYEDIT_STARTOFLINE }, |