mirror of
https://github.com/vim/vim
synced 2025-07-15 16:51:57 +00:00
- Match more function calls. - Contain function call syntax groups. - Improve differentiation between Ex commands and builtin functions with the same name. Remove special cases. Command modifiers are not currently well differentiated from functions. closes: #17712 Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
37 lines
541 B
VimL
37 lines
541 B
VimL
" Vim :match command
|
|
|
|
|
|
match FooGroup /Foo/
|
|
match
|
|
match none
|
|
|
|
2match FooGroup /Foo/
|
|
2match
|
|
2match none
|
|
|
|
3match FooGroup /Foo/
|
|
3match
|
|
3match none
|
|
|
|
|
|
" Differentiate match() from :match
|
|
|
|
call match(haystack, 'needle')
|
|
call match (haystack, 'needle')
|
|
|
|
function Foo()
|
|
match FooGroup /Foo/
|
|
call match(haystack, 'needle')
|
|
call match (haystack, 'needle')
|
|
endfunction
|
|
|
|
def Foo()
|
|
# command
|
|
match FooGroup /Foo/
|
|
# function
|
|
match(haystack, 'needle')
|
|
# Error: bad :match command - trailing characters
|
|
match (haystack, 'needle')
|
|
enddef
|
|
|