comparison runtime/indent/idlang.vim @ 11518:63b0b7b79b25

Update runtime files. commit https://github.com/vim/vim/commit/3ec574f2b549f456f664f689d6da36dc5719aeb9 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jun 13 18:12:01 2017 +0200 Update runtime files. Includes changing &sw to shiftwidth() for all indent scripts.
author Christian Brabandt <cb@256bit.org>
date Tue, 13 Jun 2017 18:15:04 +0200
parents dd6c2497c997
children 9c221ad9634a
comparison
equal deleted inserted replaced
11517:01330ca5f7f8 11518:63b0b7b79b25
1 " IDL (Interactive Data Language) indent file. 1 " IDL (Interactive Data Language) indent file.
2 " Language: IDL (ft=idlang) 2 " Language: IDL (ft=idlang)
3 " Last change: 2012 May 18 3 " Last change: 2017 Jun 13
4 " Maintainer: Aleksandar Jelenak <ajelenak AT yahoo.com> 4 " Maintainer: Aleksandar Jelenak <ajelenak AT yahoo.com>
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
32 let curind = indent(pnum) 32 let curind = indent(pnum)
33 33
34 " Indenting of continued lines. 34 " Indenting of continued lines.
35 if getline(pnum) =~ '\$\s*\(;.*\)\=$' 35 if getline(pnum) =~ '\$\s*\(;.*\)\=$'
36 if getline(pnum2) !~ '\$\s*\(;.*\)\=$' 36 if getline(pnum2) !~ '\$\s*\(;.*\)\=$'
37 let curind = curind+&sw 37 let curind = curind+shiftwidth()
38 endif 38 endif
39 else 39 else
40 if getline(pnum2) =~ '\$\s*\(;.*\)\=$' 40 if getline(pnum2) =~ '\$\s*\(;.*\)\=$'
41 let curind = curind-&sw 41 let curind = curind-shiftwidth()
42 endif 42 endif
43 endif 43 endif
44 44
45 " Indenting blocks of statements. 45 " Indenting blocks of statements.
46 if getline(v:lnum) =~? '^\s*\(endif\|endelse\|endwhile\|endfor\|endrep\)\>' 46 if getline(v:lnum) =~? '^\s*\(endif\|endelse\|endwhile\|endfor\|endrep\)\>'
47 if getline(pnum) =~? 'begin\>' 47 if getline(pnum) =~? 'begin\>'
48 elseif indent(v:lnum) > curind-&sw 48 elseif indent(v:lnum) > curind-shiftwidth()
49 let curind = curind-&sw 49 let curind = curind-shiftwidth()
50 else 50 else
51 return -1 51 return -1
52 endif 52 endif
53 elseif getline(pnum) =~? 'begin\>' 53 elseif getline(pnum) =~? 'begin\>'
54 if indent(v:lnum) < curind+&sw 54 if indent(v:lnum) < curind+shiftwidth()
55 let curind = curind+&sw 55 let curind = curind+shiftwidth()
56 else 56 else
57 return -1 57 return -1
58 endif 58 endif
59 endif 59 endif
60 return curind 60 return curind