comparison runtime/indent/vim.vim @ 2729:12f838be9c59

Updated runtime file. Fix Italian translations.
author Bram Moolenaar <bram@vim.org>
date Tue, 22 Mar 2011 17:40:10 +0100
parents 339c55711247
children dd6c2497c997
comparison
equal deleted inserted replaced
2728:bffecb4e87a7 2729:12f838be9c59
1 " Vim indent file 1 " Vim indent file
2 " Language: Vim script 2 " Language: Vim script
3 " Maintainer: Bram Moolenaar <Bram@vim.org> 3 " Maintainer: Bram Moolenaar <Bram@vim.org>
4 " Last Change: 2005 Jul 06 4 " Last Change: 2011 Mar 22
5 5
6 " Only load this indent file when no other was loaded. 6 " Only load this indent file when no other was loaded.
7 if exists("b:did_indent") 7 if exists("b:did_indent")
8 finish 8 finish
9 endif 9 endif
42 if exists("g:vim_indent_cont") 42 if exists("g:vim_indent_cont")
43 let ind = ind + g:vim_indent_cont 43 let ind = ind + g:vim_indent_cont
44 else 44 else
45 let ind = ind + &sw * 3 45 let ind = ind + &sw * 3
46 endif 46 endif
47 elseif getline(lnum) =~ '\(^\||\)\s*\(if\|wh\%[ile]\|for\|try\|cat\%[ch]\|fina\%[lly]\|fu\%[nction]\|el\%[seif]\)\>'
48 let ind = ind + &sw
49 elseif getline(lnum) =~ '^\s*aug\%[roup]' && getline(lnum) !~ '^\s*aug\%[roup]\s*!\=\s\+END' 47 elseif getline(lnum) =~ '^\s*aug\%[roup]' && getline(lnum) !~ '^\s*aug\%[roup]\s*!\=\s\+END'
50 let ind = ind + &sw 48 let ind = ind + &sw
49 else
50 let line = getline(lnum)
51 let i = match(line, '\(^\||\)\s*\(if\|wh\%[ile]\|for\|try\|cat\%[ch]\|fina\%[lly]\|fu\%[nction]\|el\%[seif]\)\>')
52 if i >= 0
53 let ind += &sw
54 if strpart(line, i, 1) == '|' && has('syntax_items')
55 \ && synIDattr(synID(lnum, i, 1), "name") =~ '\(Comment\|String\)$'
56 let ind -= &sw
57 endif
58 endif
51 endif 59 endif
52 60
53 " If the previous line contains an "end" after a pipe, but not in an ":au" 61 " If the previous line contains an "end" after a pipe, but not in an ":au"
54 " command. And not when there is a backslash before the pipe. 62 " command. And not when there is a backslash before the pipe.
55 " And when syntax HL is enabled avoid a match inside a string. 63 " And when syntax HL is enabled avoid a match inside a string.