diff options
author | Andrés <andmarti@gmail.com> | 2021-03-25 13:49:18 -0300 |
---|---|---|
committer | Andrés <andmarti@gmail.com> | 2021-03-25 13:49:18 -0300 |
commit | bbf3d6552cb9a9cc287220acc6d6e83c3091ca3f (patch) | |
tree | 1b409c9a1a06b40ee7a516525c2b10a37d65c631 /src/gram.y | |
parent | dca777c8d1401590f530c26cee2924190116948d (diff) |
Added mappings for command mode.
Handle <ESC> key in mappings.
Fixed vmaps in get_mappings function.
Diffstat (limited to 'src/gram.y')
-rwxr-xr-x | src/gram.y | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -203,13 +203,16 @@ token S_YANKCOL %token S_REDO %token S_UNDO %token S_IMAP +%token S_CMAP %token S_NMAP %token S_VMAP %token S_INOREMAP +%token S_CNOREMAP %token S_NNOREMAP %token S_VNOREMAP %token S_NUNMAP %token S_IUNMAP +%token S_CUNMAP %token S_VUNMAP %token S_COLOR %token S_CELLCOLOR @@ -612,6 +615,11 @@ command: scxfree($2); scxfree($3); } + | S_CMAP STRING STRING { + add_map($2, $3, COMMAND_MODE, 1); + scxfree($2); + scxfree($3); + } | S_NNOREMAP STRING STRING { add_map($2, $3, NORMAL_MODE, 0); scxfree($2); @@ -628,6 +636,11 @@ command: scxfree($2); scxfree($3); } + | S_CNOREMAP STRING STRING { + add_map($2, $3, COMMAND_MODE, 0); + scxfree($2); + scxfree($3); + } | S_NUNMAP STRING { del_map($2, NORMAL_MODE); @@ -643,6 +656,10 @@ command: scxfree($2); } + | S_CUNMAP STRING { + del_map($2, COMMAND_MODE); + scxfree($2); + } | S_COLOR STRING { #ifdef USECOLORS chg_color($2); |