summaryrefslogtreecommitdiffstats
path: root/src/gram.y
diff options
context:
space:
mode:
authorAndrés <andmarti@gmail.com>2021-03-25 13:49:18 -0300
committerAndrés <andmarti@gmail.com>2021-03-25 13:49:18 -0300
commitbbf3d6552cb9a9cc287220acc6d6e83c3091ca3f (patch)
tree1b409c9a1a06b40ee7a516525c2b10a37d65c631 /src/gram.y
parentdca777c8d1401590f530c26cee2924190116948d (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-xsrc/gram.y17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gram.y b/src/gram.y
index 873417b..7b9f3ab 100755
--- a/src/gram.y
+++ b/src/gram.y
@@ -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);