Mercurial > vim
comparison runtime/doc/options.txt @ 26362:dbe615b75f15 v8.2.3712
patch 8.2.3712: cannot use Vim9 lambda for 'tagfunc'
Commit: https://github.com/vim/vim/commit/05e59e3a9ffddbf93c7af02cd2ba1d0f822d4625
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Wed Dec 1 10:30:07 2021 +0000
patch 8.2.3712: cannot use Vim9 lambda for 'tagfunc'
Problem: Cannot use Vim9 lambda for 'tagfunc'.
Solution: Make it work, add more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/9250)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 01 Dec 2021 11:45:02 +0100 |
parents | a2e6da79274d |
children | 8aba638e91eb |
comparison
equal
deleted
inserted
replaced
26361:51dc5e9bbfb0 | 26362:dbe615b75f15 |
---|---|
377 or a function reference or a lambda function. Examples: | 377 or a function reference or a lambda function. Examples: |
378 > | 378 > |
379 set opfunc=MyOpFunc | 379 set opfunc=MyOpFunc |
380 set opfunc=function('MyOpFunc') | 380 set opfunc=function('MyOpFunc') |
381 set opfunc=funcref('MyOpFunc') | 381 set opfunc=funcref('MyOpFunc') |
382 let &opfunc = "{t -> MyOpFunc(t)}" | 382 set opfunc={a\ ->\ MyOpFunc(a)} |
383 " set using a funcref variable | |
384 let Fn = function('MyTagFunc') | |
385 let &tagfunc = string(Fn) | |
386 " set using a lambda expression | |
387 let &tagfunc = "{t -> MyTagFunc(t)}" | |
388 " set using a variable with lambda expression | |
389 let L = {a, b, c -> MyTagFunc(a, b , c)} | |
390 let &tagfunc = string(L) | |
383 < | 391 < |
384 | 392 |
385 Setting the filetype | 393 Setting the filetype |
386 | 394 |
387 :setf[iletype] [FALLBACK] {filetype} *:setf* *:setfiletype* | 395 :setf[iletype] [FALLBACK] {filetype} *:setf* *:setfiletype* |