annotate runtime/ftplugin/zimbu.vim @ 28944:f498ab5c82ea v8.2.4994

patch 8.2.4994: tests are using legacy functions Commit: https://github.com/vim/vim/commit/7e569d09d2ec4fa334a2d3d5b0b6dbca16d97133 Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 21 21:30:50 2022 +0100 patch 8.2.4994: tests are using legacy functions Problem: Tests are using legacy functions. Solution: Convert a few tests to use :def functions.
author Bram Moolenaar <Bram@vim.org>
date Sat, 21 May 2022 22:45:03 +0200
parents 624439a39432
children fee9eccee266
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
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 " Maintainer: Bram Moolenaar <Bram@vim.org>
26148
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
4 " Last Change: 2021 Nov 12
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 " Only do this when not done yet for this buffer
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 if exists("b:did_ftplugin")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 finish
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 endif
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 " Don't load another plugin for this buffer
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 let b:did_ftplugin = 1
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 " Using line continuation here.
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 let s:cpo_save = &cpo
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 set cpo-=C
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17
3526
dd6c2497c997 Fix more 'cpo' issues in runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
18 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
19
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 " Set 'formatoptions' to break comment lines but not other lines,
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 " and insert the comment leader when hitting <CR> or using "o".
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 setlocal fo-=t fo+=croql
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 " Set completion with CTRL-X CTRL-O to autoloaded function.
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 if exists('&ofu')
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 setlocal ofu=ccomplete#Complete
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 endif
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 " Set 'comments' to format dashed lists in comments.
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 " And to keep Zudocu comment characters.
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 setlocal comments=sO:#\ -,mO:#\ \ ,:#=,:#-,:#%,:#
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 setlocal errorformat^=%f\ line\ %l\ col\ %c:\ %m,ERROR:\ %m
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 " 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
36 " braces in comments.
26148
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
37 if exists("loaded_matchit") && !exists("b:match_words")
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
38 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
39 let b:match_skip = 's:comment\|string\|zimbuchar'
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
40 let b:undo_ftplugin ..= " | unlet! b:match_words b:match_skip"
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
41 endif
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 setlocal tw=78
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 setlocal et sts=2 sw=2
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
45
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46 " Does replace when a dot, space or closing brace is typed.
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
47 func! GCUpperDot(what)
3830
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
48 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
49 " no space or dot after the typed text
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
50 let g:got_char = v:char
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
51 return a:what
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52 endif
3830
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
53 return GCUpperCommon(a:what)
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
54 endfunc
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
55
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
56 " Does not replace when a dot is typed.
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
57 func! GCUpper(what)
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
58 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
59 " no space or other "terminating" character after the typed text
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
60 let g:got_char = v:char
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
61 return a:what
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
62 endif
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
63 return GCUpperCommon(a:what)
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
64 endfunc
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
65
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
66 " Only replaces when a space is typed.
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
67 func! GCUpperSpace(what)
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
68 if v:char != ' '
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
69 " no space after the typed text
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
70 let g:got_char = v:char
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
71 return a:what
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
72 endif
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
73 return GCUpperCommon(a:what)
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
74 endfunc
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
75
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
76 func! GCUpperCommon(what)
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
77 let col = col(".") - strlen(a:what)
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
78 if col > 1 && getline('.')[col - 2] != ' '
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
79 " no space before the typed text
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
80 let g:got_char = 999
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
81 return a:what
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
82 endif
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
83 let synName = synIDattr(synID(line("."), col(".") - 2, 1), "name")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
84 if synName =~ 'Comment\|String\|zimbuCregion\|\<c'
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
85 " inside a comment or C code
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
86 let g:got_char = 777
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
87 return a:what
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
88 endif
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
89 let g:got_char = 1111
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
90 return toupper(a:what)
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
91 endfunc
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
92
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
93 iabbr <buffer> <expr> alias GCUpperSpace("alias")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
94 iabbr <buffer> <expr> arg GCUpperDot("arg")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
95 iabbr <buffer> <expr> break GCUpper("break")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
96 iabbr <buffer> <expr> case GCUpperSpace("case")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
97 iabbr <buffer> <expr> catch GCUpperSpace("catch")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
98 iabbr <buffer> <expr> check GCUpperDot("check")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
99 iabbr <buffer> <expr> class GCUpperSpace("class")
3830
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
100 iabbr <buffer> <expr> interface GCUpperSpace("interface")
04592728474a Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3526
diff changeset
101 iabbr <buffer> <expr> implements GCUpperSpace("implements")
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
102 iabbr <buffer> <expr> shared GCUpperSpace("shared")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
103 iabbr <buffer> <expr> continue GCUpper("continue")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
104 iabbr <buffer> <expr> default GCUpper("default")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
105 iabbr <buffer> <expr> extends GCUpper("extends")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
106 iabbr <buffer> <expr> do GCUpper("do")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
107 iabbr <buffer> <expr> else GCUpper("else")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
108 iabbr <buffer> <expr> elseif GCUpperSpace("elseif")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
109 iabbr <buffer> <expr> enum GCUpperSpace("enum")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
110 iabbr <buffer> <expr> exit GCUpper("exit")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
111 iabbr <buffer> <expr> false GCUpper("false")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
112 iabbr <buffer> <expr> fail GCUpper("fail")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
113 iabbr <buffer> <expr> finally GCUpper("finally")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
114 iabbr <buffer> <expr> for GCUpperSpace("for")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
115 iabbr <buffer> <expr> func GCUpperSpace("func")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
116 iabbr <buffer> <expr> if GCUpperSpace("if")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
117 iabbr <buffer> <expr> import GCUpperSpace("import")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
118 iabbr <buffer> <expr> in GCUpperSpace("in")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
119 iabbr <buffer> <expr> io GCUpperDot("io")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
120 iabbr <buffer> <expr> main GCUpper("main")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
121 iabbr <buffer> <expr> module GCUpperSpace("module")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
122 iabbr <buffer> <expr> new GCUpper("new")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
123 iabbr <buffer> <expr> nil GCUpper("nil")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
124 iabbr <buffer> <expr> ok GCUpper("ok")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
125 iabbr <buffer> <expr> proc GCUpperSpace("proc")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
126 iabbr <buffer> <expr> proceed GCUpper("proceed")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
127 iabbr <buffer> <expr> return GCUpper("return")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
128 iabbr <buffer> <expr> step GCUpperSpace("step")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
129 iabbr <buffer> <expr> switch GCUpperSpace("switch")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
130 iabbr <buffer> <expr> sys GCUpperDot("sys")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
131 iabbr <buffer> <expr> this GCUpperDot("this")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
132 iabbr <buffer> <expr> throw GCUpperSpace("throw")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
133 iabbr <buffer> <expr> try GCUpper("try")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
134 iabbr <buffer> <expr> to GCUpperSpace("to")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
135 iabbr <buffer> <expr> true GCUpper("true")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
136 iabbr <buffer> <expr> until GCUpperSpace("until")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
137 iabbr <buffer> <expr> while GCUpperSpace("while")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
138 iabbr <buffer> <expr> repeat GCUpper("repeat")
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
139
26148
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
140 let b:undo_ftplugin ..=
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
141 \ " | iunabbr <buffer> alias" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
142 \ " | iunabbr <buffer> arg" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
143 \ " | iunabbr <buffer> break" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
144 \ " | iunabbr <buffer> case" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
145 \ " | iunabbr <buffer> catch" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
146 \ " | iunabbr <buffer> check" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
147 \ " | iunabbr <buffer> class" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
148 \ " | iunabbr <buffer> interface" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
149 \ " | iunabbr <buffer> implements" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
150 \ " | iunabbr <buffer> shared" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
151 \ " | iunabbr <buffer> continue" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
152 \ " | iunabbr <buffer> default" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
153 \ " | iunabbr <buffer> extends" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
154 \ " | iunabbr <buffer> do" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
155 \ " | iunabbr <buffer> else" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
156 \ " | iunabbr <buffer> elseif" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
157 \ " | iunabbr <buffer> enum" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
158 \ " | iunabbr <buffer> exit" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
159 \ " | iunabbr <buffer> false" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
160 \ " | iunabbr <buffer> fail" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
161 \ " | iunabbr <buffer> finally" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
162 \ " | iunabbr <buffer> for" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
163 \ " | iunabbr <buffer> func" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
164 \ " | iunabbr <buffer> if" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
165 \ " | iunabbr <buffer> import" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
166 \ " | iunabbr <buffer> in" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
167 \ " | iunabbr <buffer> io" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
168 \ " | iunabbr <buffer> main" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
169 \ " | iunabbr <buffer> module" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
170 \ " | iunabbr <buffer> new" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
171 \ " | iunabbr <buffer> nil" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
172 \ " | iunabbr <buffer> ok" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
173 \ " | iunabbr <buffer> proc" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
174 \ " | iunabbr <buffer> proceed" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
175 \ " | iunabbr <buffer> return" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
176 \ " | iunabbr <buffer> step" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
177 \ " | iunabbr <buffer> switch" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
178 \ " | iunabbr <buffer> sys" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
179 \ " | iunabbr <buffer> this" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
180 \ " | iunabbr <buffer> throw" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
181 \ " | iunabbr <buffer> try" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
182 \ " | iunabbr <buffer> to" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
183 \ " | iunabbr <buffer> true" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
184 \ " | iunabbr <buffer> until" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
185 \ " | iunabbr <buffer> while" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
186 \ " | iunabbr <buffer> repeat"
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
187
13051
a6d3e2081544 Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 3830
diff changeset
188 if !exists("no_plugin_maps") && !exists("no_zimbu_maps")
a6d3e2081544 Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 3830
diff changeset
189 nnoremap <silent> <buffer> [[ m`:call ZimbuGoStartBlock()<CR>
a6d3e2081544 Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 3830
diff changeset
190 nnoremap <silent> <buffer> ]] m`:call ZimbuGoEndBlock()<CR>
26148
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
191 let b:undo_ftplugin ..=
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
192 \ " | silent! exe 'nunmap <buffer> [['" ..
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 13051
diff changeset
193 \ " | silent! exe 'nunmap <buffer> ]]'"
13051
a6d3e2081544 Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 3830
diff changeset
194 endif
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
195
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
196 " Using a function makes sure the search pattern is restored
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
197 func! ZimbuGoStartBlock()
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
198 ?^\s*\(FUNC\|PROC\|MAIN\|ENUM\|CLASS\|INTERFACE\)\>
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
199 endfunc
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
200 func! ZimbuGoEndBlock()
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
201 /^\s*\(FUNC\|PROC\|MAIN\|ENUM\|CLASS\|INTERFACE\)\>
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
202 endfunc
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
203
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 let &cpo = s:cpo_save
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
206 unlet s:cpo_save