summaryrefslogtreecommitdiffstats
path: root/runtime/syntax/testdir/input/vim_ex_match.vim
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:05:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:05:19 +0000
commita4e9136f68a40b1cb0eb6df5a5f06603224a87f4 (patch)
treeba32e0d0069ad6adfd6b32d05161a03eea5e4c7c /runtime/syntax/testdir/input/vim_ex_match.vim
parentReleasing progress-linux version 2:9.1.0496-1~progress7.99u1. (diff)
downloadvim-a4e9136f68a40b1cb0eb6df5a5f06603224a87f4.tar.xz
vim-a4e9136f68a40b1cb0eb6df5a5f06603224a87f4.zip
Merging upstream version 2:9.1.0698.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'runtime/syntax/testdir/input/vim_ex_match.vim')
-rw-r--r--runtime/syntax/testdir/input/vim_ex_match.vim32
1 files changed, 32 insertions, 0 deletions
diff --git a/runtime/syntax/testdir/input/vim_ex_match.vim b/runtime/syntax/testdir/input/vim_ex_match.vim
new file mode 100644
index 0000000..8d14628
--- /dev/null
+++ b/runtime/syntax/testdir/input/vim_ex_match.vim
@@ -0,0 +1,32 @@
+" Vim :match, :2match and :3match commands
+
+match FooGroup /Foo/
+match
+match none
+
+2match FooGroup /Foo/
+2match
+2match none
+
+3match FooGroup /Foo/
+3match
+3match none
+
+
+" Differentiate map() from :map
+
+call match(haystack, 'needle')
+call match (haystack, 'needle')
+
+function Foo()
+ match FooGroup /Foo/
+ call match(haystack, 'needle')
+ call match (haystack, 'needle')
+endfunction
+
+def Foo()
+ match FooGroup /Foo/
+ match(haystack, 'needle')
+ # Error: bad :match command - trailing characters
+ match (haystack, 'needle')
+enddef