annotate runtime/ftplugin/zimbu.vim @ 34134:8ae680be2a51

runtime(ftplugin): Use "*" browsefilter pattern to match "All Files" Commit: https://github.com/vim/vim/commit/93197fde0f1db09b1e495cf3eb14a8f42c318b80 Author: Doug Kearns <dougkearns@gmail.com> Date: Sun Jan 14 20:59:02 2024 +0100 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files" Problem: The "*.*" browsefilter pattern only matches all files on Windows (Daryl Lee) Solution: Use "*" to filter on all platforms but keep "*.*" as the label text on Windows. (Fixes #12685, Doug Kearns) The *.* browsefilter pattern used to match "All Files" on Windows is a legacy of the DOS 8.3 filename wildcard matching algorithm. For reasons of backward compatibility this still works on Windows to match all files, even those without an extension. However, this pattern only matches filenames containing a dot on other platforms. This often makes files without an extension difficult to access from the file dialog, e.g., "Makefile" On Windows it is still standard practice to use "*.*" for the filter label so ftplugins should use "All Files (*.*)" on Windows and "All Files (*)" on other platforms. This matches Vim's default browsefilter values. This commit also normalises the browsefilter conditional test to check for the Win32 and GTK GUI features and an unset b:browsefilter. closes: #12759 Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sun, 14 Jan 2024 21:15:03 +0100
parents 4027cefc2aab
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 " Vim filetype plugin file
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2 " Language: Zimbu
32770
4027cefc2aab Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
Christian Brabandt <cb@256bit.org>
parents: 30202
diff changeset
3 " Maintainer: The Vim Project <https://github.com/vim/vim>
4027cefc2aab Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
Christian Brabandt <cb@256bit.org>
parents: 30202
diff changeset
4 " Last Change: 2023 Aug 10
4027cefc2aab Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
Christian Brabandt <cb@256bit.org>
parents: 30202
diff changeset
5 " Former Maintainer: Bram Moolenaar <Bram@vim.org>
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 " Only do this when not done yet for this buffer
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 if exists("b:did_ftplugin")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 finish
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 endif
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 " Don't load another plugin for this buffer
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 let b:did_ftplugin = 1
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 " Using line continuation here.
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 let s:cpo_save = &cpo
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 set cpo-=C
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18
3526
dd6c2497c997 Fix more 'cpo' issues in runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
19 let b:undo_ftplugin = "setl fo< com< ofu< efm< tw< et< sts< sw< | if has('vms') | setl isk< | endif"
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 " Set 'formatoptions' to break comment lines but not other lines,
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 " and insert the comment leader when hitting <CR> or using "o".
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 setlocal fo-=t fo+=croql
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 " Set completion with CTRL-X CTRL-O to autoloaded function.
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 if exists('&ofu')
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 setlocal ofu=ccomplete#Complete
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 endif
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 " Set 'comments' to format dashed lists in comments.
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 " And to keep Zudocu comment characters.
30202
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26148
diff changeset
32 setlocal comments=sO:#\ -,mO:#\ \ ,exO:#/,s:/*,m:\ ,ex:*/,:#=,:#-,:#%,:#
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 setlocal errorformat^=%f\ line\ %l\ col\ %c:\ %m,ERROR:\ %m
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 " When the matchit plugin is loaded, this makes the % command skip parens and
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 " braces in comments.
26148
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
38 if exists("loaded_matchit") && !exists("b:match_words")
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
39 let b:match_words = '\(^\s*\)\@<=\(MODULE\|CLASS\|INTERFACE\|BITS\|ENUM\|SHARED\|FUNC\|REPLACE\|DEFINE\|PROC\|EQUAL\|MAIN\|IF\|GENERATE_IF\|WHILE\|REPEAT\|WITH\|DO\|FOR\|SWITCH\|TRY\)\>\|{\s*$:\(^\s*\)\@<=\(ELSE\|ELSEIF\|GENERATE_ELSE\|GENERATE_ELSEIF\|CATCH\|FINALLY\)\>:\(^\s*\)\@<=\(}\|\<UNTIL\>\)'
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
40 let b:match_skip = 's:comment\|string\|zimbuchar'
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
41 let b:undo_ftplugin ..= " | unlet! b:match_words b:match_skip"
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
42 endif
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 setlocal tw=78
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
45 setlocal et sts=2 sw=2
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
47 " Does replace when a dot, space or closing brace is typed.
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
48 func! GCUpperDot(what)
3830
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
49 if v:char != ' ' && v:char != "\r" && v:char != "\x1b" && v:char != '.' && v:char != ')' && v:char != '}' && v:char != ','
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
50 " no space or dot after the typed text
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
51 let g:got_char = v:char
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52 return a:what
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53 endif
3830
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
54 return GCUpperCommon(a:what)
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
55 endfunc
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
56
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
57 " Does not replace when a dot is typed.
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
58 func! GCUpper(what)
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
59 if v:char != ' ' && v:char != "\r" && v:char != "\x1b" && v:char != ')' && v:char != ','
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
60 " no space or other "terminating" character after the typed text
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
61 let g:got_char = v:char
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
62 return a:what
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
63 endif
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
64 return GCUpperCommon(a:what)
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
65 endfunc
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
66
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
67 " Only replaces when a space is typed.
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
68 func! GCUpperSpace(what)
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
69 if v:char != ' '
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
70 " no space after the typed text
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
71 let g:got_char = v:char
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
72 return a:what
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
73 endif
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
74 return GCUpperCommon(a:what)
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
75 endfunc
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
76
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
77 func! GCUpperCommon(what)
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
78 let col = col(".") - strlen(a:what)
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
79 if col > 1 && getline('.')[col - 2] != ' '
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
80 " no space before the typed text
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
81 let g:got_char = 999
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
82 return a:what
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
83 endif
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
84 let synName = synIDattr(synID(line("."), col(".") - 2, 1), "name")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
85 if synName =~ 'Comment\|String\|zimbuCregion\|\<c'
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
86 " inside a comment or C code
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
87 let g:got_char = 777
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
88 return a:what
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
89 endif
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
90 let g:got_char = 1111
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
91 return toupper(a:what)
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
92 endfunc
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
93
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
94 iabbr <buffer> <expr> alias GCUpperSpace("alias")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
95 iabbr <buffer> <expr> arg GCUpperDot("arg")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
96 iabbr <buffer> <expr> break GCUpper("break")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
97 iabbr <buffer> <expr> case GCUpperSpace("case")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
98 iabbr <buffer> <expr> catch GCUpperSpace("catch")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
99 iabbr <buffer> <expr> check GCUpperDot("check")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
100 iabbr <buffer> <expr> class GCUpperSpace("class")
3830
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
101 iabbr <buffer> <expr> interface GCUpperSpace("interface")
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
102 iabbr <buffer> <expr> implements GCUpperSpace("implements")
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
103 iabbr <buffer> <expr> shared GCUpperSpace("shared")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
104 iabbr <buffer> <expr> continue GCUpper("continue")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
105 iabbr <buffer> <expr> default GCUpper("default")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
106 iabbr <buffer> <expr> extends GCUpper("extends")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
107 iabbr <buffer> <expr> do GCUpper("do")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
108 iabbr <buffer> <expr> else GCUpper("else")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
109 iabbr <buffer> <expr> elseif GCUpperSpace("elseif")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
110 iabbr <buffer> <expr> enum GCUpperSpace("enum")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
111 iabbr <buffer> <expr> exit GCUpper("exit")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
112 iabbr <buffer> <expr> false GCUpper("false")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
113 iabbr <buffer> <expr> fail GCUpper("fail")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
114 iabbr <buffer> <expr> finally GCUpper("finally")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
115 iabbr <buffer> <expr> for GCUpperSpace("for")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
116 iabbr <buffer> <expr> func GCUpperSpace("func")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
117 iabbr <buffer> <expr> if GCUpperSpace("if")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
118 iabbr <buffer> <expr> import GCUpperSpace("import")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
119 iabbr <buffer> <expr> in GCUpperSpace("in")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
120 iabbr <buffer> <expr> io GCUpperDot("io")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
121 iabbr <buffer> <expr> main GCUpper("main")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
122 iabbr <buffer> <expr> module GCUpperSpace("module")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
123 iabbr <buffer> <expr> new GCUpper("new")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
124 iabbr <buffer> <expr> nil GCUpper("nil")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
125 iabbr <buffer> <expr> ok GCUpper("ok")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
126 iabbr <buffer> <expr> proc GCUpperSpace("proc")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
127 iabbr <buffer> <expr> proceed GCUpper("proceed")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
128 iabbr <buffer> <expr> return GCUpper("return")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
129 iabbr <buffer> <expr> step GCUpperSpace("step")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
130 iabbr <buffer> <expr> switch GCUpperSpace("switch")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
131 iabbr <buffer> <expr> sys GCUpperDot("sys")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
132 iabbr <buffer> <expr> this GCUpperDot("this")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
133 iabbr <buffer> <expr> throw GCUpperSpace("throw")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
134 iabbr <buffer> <expr> try GCUpper("try")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
135 iabbr <buffer> <expr> to GCUpperSpace("to")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
136 iabbr <buffer> <expr> true GCUpper("true")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
137 iabbr <buffer> <expr> until GCUpperSpace("until")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
138 iabbr <buffer> <expr> while GCUpperSpace("while")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
139 iabbr <buffer> <expr> repeat GCUpper("repeat")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
140
26148
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
141 let b:undo_ftplugin ..=
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
142 \ " | iunabbr <buffer> alias" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
143 \ " | iunabbr <buffer> arg" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
144 \ " | iunabbr <buffer> break" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
145 \ " | iunabbr <buffer> case" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
146 \ " | iunabbr <buffer> catch" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
147 \ " | iunabbr <buffer> check" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
148 \ " | iunabbr <buffer> class" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
149 \ " | iunabbr <buffer> interface" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
150 \ " | iunabbr <buffer> implements" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
151 \ " | iunabbr <buffer> shared" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
152 \ " | iunabbr <buffer> continue" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
153 \ " | iunabbr <buffer> default" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
154 \ " | iunabbr <buffer> extends" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
155 \ " | iunabbr <buffer> do" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
156 \ " | iunabbr <buffer> else" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
157 \ " | iunabbr <buffer> elseif" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
158 \ " | iunabbr <buffer> enum" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
159 \ " | iunabbr <buffer> exit" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
160 \ " | iunabbr <buffer> false" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
161 \ " | iunabbr <buffer> fail" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
162 \ " | iunabbr <buffer> finally" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
163 \ " | iunabbr <buffer> for" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
164 \ " | iunabbr <buffer> func" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
165 \ " | iunabbr <buffer> if" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
166 \ " | iunabbr <buffer> import" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
167 \ " | iunabbr <buffer> in" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
168 \ " | iunabbr <buffer> io" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
169 \ " | iunabbr <buffer> main" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
170 \ " | iunabbr <buffer> module" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
171 \ " | iunabbr <buffer> new" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
172 \ " | iunabbr <buffer> nil" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
173 \ " | iunabbr <buffer> ok" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
174 \ " | iunabbr <buffer> proc" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
175 \ " | iunabbr <buffer> proceed" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
176 \ " | iunabbr <buffer> return" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
177 \ " | iunabbr <buffer> step" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
178 \ " | iunabbr <buffer> switch" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
179 \ " | iunabbr <buffer> sys" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
180 \ " | iunabbr <buffer> this" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
181 \ " | iunabbr <buffer> throw" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
182 \ " | iunabbr <buffer> try" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
183 \ " | iunabbr <buffer> to" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
184 \ " | iunabbr <buffer> true" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
185 \ " | iunabbr <buffer> until" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
186 \ " | iunabbr <buffer> while" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
187 \ " | iunabbr <buffer> repeat"
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
188
13051
a6d3e2081544 Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 3830
diff changeset
189 if !exists("no_plugin_maps") && !exists("no_zimbu_maps")
a6d3e2081544 Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 3830
diff changeset
190 nnoremap <silent> <buffer> [[ m`:call ZimbuGoStartBlock()<CR>
a6d3e2081544 Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 3830
diff changeset
191 nnoremap <silent> <buffer> ]] m`:call ZimbuGoEndBlock()<CR>
26148
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
192 let b:undo_ftplugin ..=
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
193 \ " | silent! exe 'nunmap <buffer> [['" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
194 \ " | silent! exe 'nunmap <buffer> ]]'"
13051
a6d3e2081544 Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 3830
diff changeset
195 endif
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
196
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
197 " Using a function makes sure the search pattern is restored
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
198 func! ZimbuGoStartBlock()
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
199 ?^\s*\(FUNC\|PROC\|MAIN\|ENUM\|CLASS\|INTERFACE\)\>
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
200 endfunc
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
201 func! ZimbuGoEndBlock()
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
202 /^\s*\(FUNC\|PROC\|MAIN\|ENUM\|CLASS\|INTERFACE\)\>
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
203 endfunc
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
204
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
205
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
206 let &cpo = s:cpo_save
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
207 unlet s:cpo_save