diff options
author | Matthieu Coudron <mattator@gmail.com> | 2017-03-21 03:21:53 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-07-28 01:27:58 +0200 |
commit | dc685387a3d60e9ea3d09c80c74d4613b618cf14 (patch) | |
tree | 76dc55b7f9bf077dd0f16c94d01a23e43663390a /runtime | |
parent | e6d54407ba8ce580fbd81cb9389eb9ce4483597b (diff) | |
download | rneovim-dc685387a3d60e9ea3d09c80c74d4613b618cf14.tar.gz rneovim-dc685387a3d60e9ea3d09c80c74d4613b618cf14.tar.bz2 rneovim-dc685387a3d60e9ea3d09c80c74d4613b618cf14.zip |
viml: introduce menu_get() function #6322
menu_get({path}, {modes}). See :h menu_get.
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 3e75a42a62..3a27b2d7a0 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -5508,6 +5508,46 @@ max({expr}) Return the maximum value of all items in {expr}. items in {expr} cannot be used as a Number this results in an error. An empty |List| or |Dictionary| results in zero. +menu_get({path}, {modes}) *menu_get()* + Returns a |Dictionary| with all the submenu of {path} (set to + an empty string to match all menus). Only the commands matching {modes} are + returned ('a' for all, 'i' for insert see |creating-menus|). + + For instance, executing: +> + nnoremenu &Test.Test inormal + inoremenu Test.Test insert + vnoremenu Test.Test x + echo menu_get("") +< +should produce an output with a similar structure: +> + [ { + "hidden": 0, + "name": "Test", + "priority": 500, + "shortcut": 84, + "submenus": [ { + "hidden": 0, + "mappings": { + i": { + "enabled": 1, + "noremap": 1, + "rhs": "insert", + "sid": 1, + "silent": 0 + }, + n": { ... }, + s": { ... }, + v": { ... } + }, + "name": "Test", + "priority": 500, + "shortcut": 0 + } ] + } ] +< + *min()* min({expr}) Return the minimum value of all items in {expr}. {expr} can be a list or a dictionary. For a dictionary, |