diff options
author | TJ DeVries <timothydvrs1234@gmail.com> | 2017-05-25 05:41:53 -0500 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2017-05-25 12:41:53 +0200 |
commit | 45626de63f2b8057c13df0466406c43f04d6a1e6 (patch) | |
tree | 8d7b632a2be423f21d93d895cafe22e1a3ce60fa /src/nvim/api/vim.c | |
parent | f4fddbfb778ad5c6600af90d323156e42ee13450 (diff) | |
download | rneovim-45626de63f2b8057c13df0466406c43f04d6a1e6.tar.gz rneovim-45626de63f2b8057c13df0466406c43f04d6a1e6.tar.bz2 rneovim-45626de63f2b8057c13df0466406c43f04d6a1e6.zip |
get_keymap API (#6236)
* Add api function get keymap
nvim_get_keymap(mode)
nvim_buf_get_keymap(buffer, mode)
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r-- | src/nvim/api/vim.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c index 53e5f71fd4..0cffb2c87d 100644 --- a/src/nvim/api/vim.c +++ b/src/nvim/api/vim.c @@ -742,6 +742,17 @@ Dictionary nvim_get_mode(void) return rv; } +/// Get a list of dictionaries describing global (i.e. non-buffer) mappings +/// Note that the "buffer" key will be 0 to represent false. +/// +/// @param mode The abbreviation for the mode +/// @returns An array of maparg() like dictionaries describing mappings +ArrayOf(Dictionary) nvim_get_keymap(String mode) + FUNC_API_SINCE(3) +{ + return keymap_array(mode, NULL); +} + Array nvim_get_api_info(uint64_t channel_id) FUNC_API_SINCE(1) FUNC_API_ASYNC FUNC_API_REMOTE_ONLY { |