diff options
author | ckelsel <ckelsel@hotmail.com> | 2017-07-29 09:33:29 +0800 |
---|---|---|
committer | ckelsel <ckelsel@hotmail.com> | 2017-07-29 09:33:29 +0800 |
commit | 973bc2b7e0ef1ca33764410ba0a22fc57bd42366 (patch) | |
tree | 5add9a29ea124d8012d11b11095faca28a623f84 /runtime | |
parent | 3e0536eb295309c728acca386ec35756b7e034f6 (diff) | |
parent | 707bb3749459fb30c02701b63553af7a3460f980 (diff) | |
download | rneovim-973bc2b7e0ef1ca33764410ba0a22fc57bd42366.tar.gz rneovim-973bc2b7e0ef1ca33764410ba0a22fc57bd42366.tar.bz2 rneovim-973bc2b7e0ef1ca33764410ba0a22fc57bd42366.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 45 | ||||
-rw-r--r-- | runtime/doc/vim_diff.txt | 1 |
2 files changed, 46 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 3e75a42a62..b68c70bf9f 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -5508,6 +5508,51 @@ 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 |List| of |Dictionaries| describing |menus| (defined + by |:menu|, |:amenu|, etc.). + {path} limits the result to a subtree of the menu hierarchy + (empty string matches all menus). E.g. to get items in the + "File" menu subtree: > + :echo menu_get('File','') +< + {modes} is a string of zero or more modes (see |maparg()| or + |creating-menus| for the list of modes). "a" means "all". + + For example: > + nnoremenu &Test.Test inormal + inoremenu Test.Test insert + vnoremenu Test.Test x + echo menu_get("") +< + returns something like this: +> + [ { + "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, diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index 5801da1132..270e958609 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -127,6 +127,7 @@ Functions: |dictwatcheradd()| notifies a callback whenever a |Dict| is modified |dictwatcherdel()| |execute()| works with |:redir| + |menu_get()| |msgpackdump()|, |msgpackparse()| provide msgpack de/serialization Events: |