comparison runtime/indent/vb.vim @ 39:c16898406ff2

synchorinize version 7.3.081
author one@zeus.cr.ie.u-ryukyu.ac.jp
date Fri, 17 Dec 2010 17:43:06 +0900
parents 76efa0be13f1
children
comparison
equal deleted inserted replaced
38:e06a1cd7230d 39:c16898406ff2
1 " Vim indent file 1 " Vim indent file
2 " Language: VisualBasic (ft=vb) / Basic (ft=basic) / SaxBasic (ft=vb) 2 " Language: VisualBasic (ft=vb) / Basic (ft=basic) / SaxBasic (ft=vb)
3 " Author: Johannes Zellner <johannes@zellner.org> 3 " Author: Johannes Zellner <johannes@zellner.org>
4 " Last Change: Fri, 18 Jun 2004 07:22:42 CEST 4 " Last Change: Fri, 18 Jun 2004 07:22:42 CEST
5 " Small update 2010 Jul 28 by Maxim Kim
5 6
6 if exists("b:did_indent") 7 if exists("b:did_indent")
7 finish 8 finish
8 endif 9 endif
9 let b:did_indent = 1 10 let b:did_indent = 1
45 endif 46 endif
46 47
47 let ind = indent(lnum) 48 let ind = indent(lnum)
48 49
49 " Add 50 " Add
50 if previous_line =~? '^\s*\<\(begin\|\%(\%(private\|public\|friend\)\s\+\)\=\%(function\|sub\|property\)\|select\|case\|default\|if\>.\{-}\<then\>\s*$\|else\|elseif\|do\|for\|while\|enum\|with\)\>' 51 if previous_line =~? '^\s*\<\(begin\|\%(\%(private\|public\|friend\)\s\+\)\=\%(function\|sub\|property\)\|select\|case\|default\|if\|else\|elseif\|do\|for\|while\|enum\|with\)\>'
51 let ind = ind + &sw 52 let ind = ind + &sw
52 endif 53 endif
53 54
54 " Subtract 55 " Subtract
55 if this_line =~? '^\s*\<end\>\s\+\<select\>' 56 if this_line =~? '^\s*\<end\>\s\+\<select\>'
61 " 62 "
62 " select case readwrite 63 " select case readwrite
63 " end select 64 " end select
64 let ind = ind - &sw 65 let ind = ind - &sw
65 endif 66 endif
66 elseif this_line =~? '^\s*\<\(end\|else\|until\|loop\|next\|wend\)\>' 67 elseif this_line =~? '^\s*\<\(end\|else\|elseif\|until\|loop\|next\|wend\)\>'
67 let ind = ind - &sw 68 let ind = ind - &sw
68 elseif this_line =~? '^\s*\<\(case\|default\)\>' 69 elseif this_line =~? '^\s*\<\(case\|default\)\>'
69 if previous_line !~? '^\s*\<select\>' 70 if previous_line !~? '^\s*\<select\>'
70 let ind = ind - &sw 71 let ind = ind - &sw
71 endif 72 endif
72 endif 73 endif
73 74
74 return ind 75 return ind
75 endfun 76 endfun
77
78 " vim:sw=4