aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorMatthieu Coudron <mattator@gmail.com>2017-03-21 03:21:53 +0100
committerJustin M. Keyes <justinkz@gmail.com>2017-07-28 01:27:58 +0200
commitdc685387a3d60e9ea3d09c80c74d4613b618cf14 (patch)
tree76dc55b7f9bf077dd0f16c94d01a23e43663390a /runtime
parente6d54407ba8ce580fbd81cb9389eb9ce4483597b (diff)
downloadrneovim-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.txt40
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,