annotate runtime/ftplugin/vb.vim @ 963:7644c80ca87b v7.0.089

updated for version 7.0-089
author vimboss
date Tue, 05 Sep 2006 16:30:40 +0000
parents fca8a9b65afa
children 786b2a8ec970
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim filetype plugin file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: VisualBasic (ft=vb)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Johannes Zellner <johannes@zellner.org>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: Thu, 22 Nov 2001 12:56:14 W. Europe Standard Time
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 if exists("b:did_ftplugin") | finish | endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 let b:did_ftplugin = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 setlocal com=sr:'\ -,mb:'\ \ ,el:'\ \ ,:'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " we need this wrapper, as call doesn't allow a count
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 fun! <SID>VbSearch(pattern, flags)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 let cnt = v:count1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 while cnt > 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 call search(a:pattern, a:flags)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 let cnt = cnt - 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 endwhile
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 endfun
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 let s:cpo_save = &cpo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 set cpo&vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " NOTE the double escaping \\|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 nnoremap <buffer> <silent> [[ :call <SID>VbSearch('^\s*\(\(private\|public\)\s\+\)\=\(function\\|sub\)', 'bW')<cr>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 nnoremap <buffer> <silent> ]] :call <SID>VbSearch('^\s*\(\(private\|public\)\s\+\)\=\(function\\|sub\)', 'W')<cr>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 nnoremap <buffer> <silent> [] :call <SID>VbSearch('^\s*\<end\>\s\+\(function\\|sub\)', 'bW')<cr>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 nnoremap <buffer> <silent> ][ :call <SID>VbSearch('^\s*\<end\>\s\+\(function\\|sub\)', 'W')<cr>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 " matchit support
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 if exists("loaded_matchit")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 let b:match_ignorecase=1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 let b:match_words=
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 \ '\%(^\s*\)\@<=\<if\>.*\<then\>\s*$:\%(^\s*\)\@<=\<else\>:\%(^\s*\)\@<=\<elseif\>:\%(^\s*\)\@<=\<end\>\s\+\<if\>,' .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 \ '\%(^\s*\)\@<=\<for\>:\%(^\s*\)\@<=\<next\>,' .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 \ '\%(^\s*\)\@<=\<while\>:\%(^\s*\)\@<=\<wend\>,' .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 \ '\%(^\s*\)\@<=\<do\>:\%(^\s*\)\@<=\<loop\>\s\+\<while\>,' .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 \ '\%(^\s*\)\@<=\<select\>\s\+\<case\>:\%(^\s*\)\@<=\<case\>:\%(^\s*\)\@<=\<end\>\s\+\<select\>,' .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 \ '\%(^\s*\)\@<=\<enum\>:\%(^\s*\)\@<=\<end\>\s\<enum\>,' .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 \ '\%(^\s*\)\@<=\<with\>:\%(^\s*\)\@<=\<end\>\s\<with\>,' .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 \ '\%(^\s*\)\@<=\%(\<\%(private\|public\)\>\s\+\)\=\<function\>\s\+\([^ \t(]\+\):\%(^\s*\)\@<=\<\1\>\s*=:\%(^\s*\)\@<=\<end\>\s\+\<function\>,' .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 \ '\%(^\s*\)\@<=\%(\<\%(private\|public\)\>\s\+\)\=\<sub\>\s\+:\%(^\s*\)\@<=\<end\>\s\+\<sub\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 let &cpo = s:cpo_save
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 unlet s:cpo_save