1- *eval.txt* For Vim version 8.2. Last change: 2020 Mar 14
1+ *eval.txt* For Vim version 8.2. Last change: 2020 Mar 26
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2527,7 +2527,7 @@ glob({expr} [, {nosuf} [, {list} [, {alllinks}]]])
25272527glob2regpat({expr} ) String convert a glob pat into a search pat
25282528globpath({path} , {expr} [, {nosuf} [, {list} [, {alllinks} ]]])
25292529 String do glob({expr} ) for all dirs in {path}
2530- has({feature} ) Number | TRUE | if feature {feature} supported
2530+ has({feature} [, {check} ]) Number | TRUE | if feature {feature} supported
25312531has_key({dict} , {key} ) Number | TRUE | if {dict} has entry {key}
25322532haslocaldir([{winnr} [, {tabnr} ]])
25332533 Number | TRUE | if the window executed | :lcd |
@@ -2613,6 +2613,7 @@ matchstr({expr}, {pat} [, {start} [, {count}]])
26132613matchstrpos({expr} , {pat} [, {start} [, {count} ]])
26142614 List {count} 'th match of {pat} in {expr}
26152615max({expr} ) Number maximum value of items in {expr}
2616+ menu_info({name} [, {mode} ]) Dict get menu item information
26162617min({expr} ) Number minimum value of items in {expr}
26172618mkdir({name} [, {path} [, {prot} ]])
26182619 Number create directory {name}
@@ -4113,8 +4114,12 @@ exists({expr}) The result is a Number, which is |TRUE| if {expr} is defined,
41134114 string)
41144115 *funcname built-in function (see | functions | )
41154116 or user defined function (see
4116- | user-functions | ). Also works for a
4117- variable that is a Funcref.
4117+ | user-functions | ) that is implemented.
4118+ Also works for a variable that is a
4119+ Funcref.
4120+ ?funcname built-in function that could be
4121+ implemented; to be used to check if
4122+ "funcname" is valid
41184123 varname internal variable (see
41194124 | internal-variables | ). Also works
41204125 for | curly-braces-names | , | Dictionary |
@@ -4369,8 +4374,8 @@ feedkeys({string} [, {mode}]) *feedkeys()*
43694374 'L' Lowlevel input. Only works for Unix or when using the
43704375 GUI. Keys are used as if they were coming from the
43714376 terminal. Other flags are not used. *E980*
4372- When a CTRL-C interrupts it sets the internal
4373- "got_int" flag.
4377+ When a CTRL-C interrupts and 't' is included it sets
4378+ the internal "got_int" flag.
43744379 'i' Insert the string instead of appending (see above).
43754380 'x' Execute commands until typeahead is empty. This is
43764381 similar to using ":normal!". You can call feedkeys()
@@ -5839,19 +5844,31 @@ globpath({path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]])
58395844 GetExpr()->globpath(&rtp)
58405845<
58415846 *has()*
5842- has({feature} ) The result is a Number, which is 1 if the feature {feature} is
5843- supported, zero otherwise. The {feature} argument is a
5844- string. See | feature-list | below.
5847+ has({feature} [, {check} ])
5848+ When {check} is omitted or is zero: The result is a Number,
5849+ which is 1 if the feature {feature} is supported, zero
5850+ otherwise. The {feature} argument is a string, case is
5851+ ignored. See | feature-list | below.
5852+
5853+ When {check} is present and not zero: The result is a Number,
5854+ which is 1 if the feature {feature} could ever be supported,
5855+ zero otherwise. This is useful to check for a typo in
5856+ {feature} and to detect dead code. Keep in mind that an older
5857+ Vim version will not know about a feature added later and
5858+ features that have been abandoned will not be know by the
5859+ current Vim version.
5860+
58455861 Also see | exists() | .
5862+
58465863 Note that to skip code that has a syntax error when the
58475864 feature is not available, Vim may skip the rest of the line
58485865 and miss a following `endif ` . Therfore put the `endif ` on a
58495866 separate line: >
58505867 if has('feature')
58515868 let x = this->breaks->without->the->feature
58525869 endif
5853- < If the `endif ` would be in the second line it would not be
5854- found.
5870+ < If the `endif ` would be moved to the second line as "| endif" it
5871+ would not be found.
58555872
58565873
58575874has_key({dict} , {key} ) *has_key()*
@@ -7136,6 +7153,7 @@ matchstrpos({expr}, {pat} [, {start} [, {count}]]) *matchstrpos()*
71367153 Can also be used as a | method | : >
71377154 GetText()->matchstrpos('word')
71387155<
7156+
71397157 *max()*
71407158max({expr} ) Return the maximum value of all items in {expr} .
71417159 {expr} can be a List or a Dictionary. For a Dictionary,
@@ -7147,6 +7165,66 @@ max({expr}) Return the maximum value of all items in {expr}.
71477165 Can also be used as a | method | : >
71487166 mylist->max()
71497167
7168+
7169+ menu_info({name} [, {mode} ]) *menu_info()*
7170+ Return information about the specified menu {name} in
7171+ mode {mode} . The menu name should be specified without the
7172+ shortcut character ('&').
7173+
7174+ {mode} can be one of these strings:
7175+ "n" Normal
7176+ "v" Visual (including Select)
7177+ "o" Operator-pending
7178+ "i" Insert
7179+ "c" Cmd-line
7180+ "s" Select
7181+ "x" Visual
7182+ "t" Terminal-Job
7183+ "" Normal, Visual and Operator-pending
7184+ "!" Insert and Cmd-line
7185+ When {mode} is omitted, the modes for "" are used.
7186+
7187+ Returns a | Dictionary | containing the following items:
7188+ accel menu item accelerator text | menu-text |
7189+ display display name (name without '&')
7190+ enabled v:true if this menu item is enabled
7191+ Refer to | :menu-enable |
7192+ icon name of the icon file (for toolbar)
7193+ | toolbar-icon |
7194+ iconidx index of a built-in icon
7195+ modes modes for which the menu is defined. In
7196+ addition to the modes mentioned above, these
7197+ characters will be used:
7198+ " " Normal, Visual and Operator-pending
7199+ name menu item name.
7200+ noremenu v:true if the {rhs} of the menu item is not
7201+ remappable else v:false.
7202+ priority menu order priority | menu-priority |
7203+ rhs right-hand-side of the menu item. The returned
7204+ string has special characters translated like
7205+ in the output of the ":menu" command listing.
7206+ When the {rhs} of a menu item is empty, then
7207+ "<Nop> " is returned.
7208+ script v:true if script-local remapping of {rhs} is
7209+ allowed else v:false. See | :menu-script | .
7210+ shortcut shortcut key (character after '&' in
7211+ the menu name) | menu-shortcut |
7212+ silent v:true if the menu item is created
7213+ with <silent> argument | :menu-silent |
7214+ submenus | List | containing the names of
7215+ all the submenus. Present only if the menu
7216+ item has submenus.
7217+
7218+ Returns an empty dictionary if the menu item is not found.
7219+
7220+ Examples: >
7221+ :echo menu_info('Edit.Cut')
7222+ :echo menu_info('File.Save', 'n')
7223+ <
7224+ Can also be used as a | method | : >
7225+ GetMenuName()->menu_info('v')
7226+
7227+
71507228< *min()*
71517229min({expr} ) Return the minimum value of all items in {expr} .
71527230 {expr} can be a List or a Dictionary. For a Dictionary,
@@ -8742,6 +8820,7 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()*
87428820 *setreg()*
87438821setreg({regname} , {value} [, {options} ])
87448822 Set the register {regname} to {value} .
8823+ If {regname} is "" or "@", the unnamed register '"' is used.
87458824 {value} may be any value returned by | getreg() | , including
87468825 a | List | .
87478826 If {options} contains "a" or {regname} is upper case,
0 commit comments