diff runtime/ftplugin/vim.vim @ 23737:34b4eb3a8458

Update runtime files. Commit: https://github.com/vim/vim/commit/e0e3917554327f2524066f89fbbef9c83c1535da Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jan 25 21:14:57 2021 +0100 Update runtime files.
author Bram Moolenaar <Bram@vim.org>
date Mon, 25 Jan 2021 21:30:05 +0100
parents 96206643bd9f
children 5b37a0bf7e3a
line wrap: on
line diff
--- a/runtime/ftplugin/vim.vim
+++ b/runtime/ftplugin/vim.vim
@@ -1,7 +1,7 @@
 " Vim filetype plugin
 " Language:	Vim
 " Maintainer:	Bram Moolenaar <Bram@vim.org>
-" Last Change:	2021 Jan 12
+" Last Change:	2021 Jan 23
 
 " Only do this when not done yet for this buffer
 if exists("b:did_ftplugin")
@@ -88,8 +88,13 @@ endif
 " Let the matchit plugin know what items can be matched.
 if exists("loaded_matchit")
   let b:match_ignorecase = 0
+  " "func" can also be used as a type:
+  "   var Ref: func
+  " or to list functions:
+  "   func name
+  " require a parenthesis following, then there can be an "endfunc".
   let b:match_words =
-	\ '\<\%(fu\%[nction]\|def\)\>)\@!:\<retu\%[rn]\>:\<\%(endf\%[unction]\|enddef\)\>,' .
+	\ '\<\%(fu\%[nction]\|def\)\s\+\S\+(:\<retu\%[rn]\>:\<\%(endf\%[unction]\|enddef\)\>,' .
  	\ '\<\(wh\%[ile]\|for\)\>:\<brea\%[k]\>:\<con\%[tinue]\>:\<end\(w\%[hile]\|fo\%[r]\)\>,' .
 	\ '\<if\>:\<el\%[seif]\>:\<en\%[dif]\>,' .
 	\ '{:},' .