comparison runtime/doc/options.txt @ 26175:6b4f017d7005 v8.2.3619

patch 8.2.3619: cannot use a lambda for 'operatorfunc' Commit: https://github.com/vim/vim/commit/777175b0df8c5ec3cd30d19a2e887e661ac209c8 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Thu Nov 18 22:08:57 2021 +0000 patch 8.2.3619: cannot use a lambda for 'operatorfunc' Problem: Cannot use a lambda for 'operatorfunc'. Solution: Support using a lambda or partial. (Yegappan Lakshmanan, closes #8775)
author Bram Moolenaar <Bram@vim.org>
date Thu, 18 Nov 2021 23:15:04 +0100
parents 624439a39432
children 786b2a8ec970
comparison
equal deleted inserted replaced
26174:00e8f1ac9c6d 26175:6b4f017d7005
368 used. Thus it does the same as: > 368 used. Thus it does the same as: >
369 :setlocal path= 369 :setlocal path=
370 Note: In the future more global options can be made global-local. Using 370 Note: In the future more global options can be made global-local. Using
371 ":setlocal" on a global option might work differently then. 371 ":setlocal" on a global option might work differently then.
372 372
373
374 *option-value-function*
375 Some options ('completefunc', 'imactivatefunc', 'imstatusfunc', 'omnifunc',
376 'operatorfunc', 'quickfixtextfunc' and 'tagfunc') are set to a function name
377 or a function reference or a lambda function. Examples:
378 >
379 set opfunc=MyOpFunc
380 set opfunc=function("MyOpFunc")
381 set opfunc=funcref("MyOpFunc")
382 set opfunc={t\ ->\ MyOpFunc(t)}
383 <
373 384
374 Setting the filetype 385 Setting the filetype
375 386
376 :setf[iletype] [FALLBACK] {filetype} *:setf* *:setfiletype* 387 :setf[iletype] [FALLBACK] {filetype} *:setf* *:setfiletype*
377 Set the 'filetype' option to {filetype}, but only if 388 Set the 'filetype' option to {filetype}, but only if
5621 5632
5622 *'operatorfunc'* *'opfunc'* 5633 *'operatorfunc'* *'opfunc'*
5623 'operatorfunc' 'opfunc' string (default: empty) 5634 'operatorfunc' 'opfunc' string (default: empty)
5624 global 5635 global
5625 This option specifies a function to be called by the |g@| operator. 5636 This option specifies a function to be called by the |g@| operator.
5626 See |:map-operator| for more info and an example. 5637 See |:map-operator| for more info and an example. The value can be
5638 the name of a function, a |lambda| or a |Funcref|. See
5639 |option-value-function| for more information.
5627 5640
5628 This option cannot be set from a |modeline| or in the |sandbox|, for 5641 This option cannot be set from a |modeline| or in the |sandbox|, for
5629 security reasons. 5642 security reasons.
5630 5643
5631 5644
6021 This option specifies a function to be used to get the text to display 6034 This option specifies a function to be used to get the text to display
6022 in the quickfix and location list windows. This can be used to 6035 in the quickfix and location list windows. This can be used to
6023 customize the information displayed in the quickfix or location window 6036 customize the information displayed in the quickfix or location window
6024 for each entry in the corresponding quickfix or location list. See 6037 for each entry in the corresponding quickfix or location list. See
6025 |quickfix-window-function| for an explanation of how to write the 6038 |quickfix-window-function| for an explanation of how to write the
6026 function and an example. The value can be the name of a function or a 6039 function and an example. The value can be the name of a function, a
6027 lambda. 6040 |lambda| or a |Funcref|. See |option-value-function| for more
6041 information.
6028 6042
6029 This option cannot be set from a |modeline| or in the |sandbox|, for 6043 This option cannot be set from a |modeline| or in the |sandbox|, for
6030 security reasons. 6044 security reasons.
6031 6045
6032 *'quoteescape'* *'qe'* 6046 *'quoteescape'* *'qe'*