patch 8.2.1978: making a mapping work in all modes is complicated
Problem: Making a mapping work in all modes is complicated.
Solution: Add the <Cmd> special key. (Yegappan Lakshmanan, closes #7282,
closes 4784, based on patch by Bjorn Linse)
diff --git a/src/misc2.c b/src/misc2.c
index 48cc4b7..52e0499 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -2530,6 +2530,7 @@
{K_PLUG, (char_u *)"Plug"},
{K_CURSORHOLD, (char_u *)"CursorHold"},
{K_IGNORE, (char_u *)"Ignore"},
+ {K_COMMAND, (char_u *)"Cmd"},
{0, NULL}
// NOTE: When adding a long name update MAX_KEY_NAME_LEN.
};