mapping_defs.h (1336B)
1 #pragma once 2 3 #include <stdbool.h> 4 5 #include "nvim/eval/typval_defs.h" 6 7 enum { MAXMAPLEN = 50, }; ///< Maximum length of key sequence to be mapped. 8 9 /// Structure used for mappings and abbreviations. 10 typedef struct mapblock mapblock_T; 11 struct mapblock { 12 mapblock_T *m_next; ///< next mapblock in list 13 mapblock_T *m_alt; ///< pointer to mapblock of the same mapping 14 ///< with an alternative form of m_keys, or NULL 15 ///< if there is no such mapblock 16 char *m_keys; ///< mapped from, lhs 17 char *m_str; ///< mapped to, rhs 18 char *m_orig_str; ///< rhs as entered by the user 19 LuaRef m_luaref; ///< lua function reference as rhs 20 int m_keylen; ///< strlen(m_keys) 21 int m_mode; ///< valid mode 22 int m_simplified; ///< m_keys was simplified 23 int m_noremap; ///< if non-zero no re-mapping for m_str 24 char m_silent; ///< <silent> used, don't echo commands 25 char m_nowait; ///< <nowait> used 26 char m_expr; ///< <expr> used, m_str is an expression 27 sctx_T m_script_ctx; ///< SCTX where map was defined 28 char *m_desc; ///< description of mapping 29 bool m_replace_keycodes; ///< replace keycodes in result of expression 30 };