comparison runtime/indent/perl6.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 42bf9264e64e
children bd021eb62e73
comparison
equal deleted inserted replaced
11517:01330ca5f7f8 11518:63b0b7b79b25
1 " Vim indent file 1 " Vim indent file
2 " Language: Perl 6 2 " Language: Perl 6
3 " Maintainer: vim-perl <vim-perl@googlegroups.com> 3 " Maintainer: vim-perl <vim-perl@googlegroups.com>
4 " Homepage: http://github.com/vim-perl/vim-perl 4 " Homepage: http://github.com/vim-perl/vim-perl
5 " Bugs/requests: http://github.com/vim-perl/vim-perl/issues 5 " Bugs/requests: http://github.com/vim-perl/vim-perl/issues
6 " Last Change: 2013-07-21 6 " Last Change: 2017 Jun 13
7 " Contributors: Andy Lester <andy@petdance.com> 7 " Contributors: Andy Lester <andy@petdance.com>
8 " Hinrik Örn Sigurðsson <hinrik.sig@gmail.com> 8 " Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
9 " 9 "
10 " Adapted from indent/perl.vim by Rafael Garcia-Suarez <rgarciasuarez@free.fr> 10 " Adapted from indent/perl.vim by Rafael Garcia-Suarez <rgarciasuarez@free.fr>
11 11
105 endif 105 endif
106 endwhile 106 endwhile
107 endif 107 endif
108 108
109 if line =~ '[<«\[{(]\s*\(#[^)}\]»>]*\)\=$' 109 if line =~ '[<«\[{(]\s*\(#[^)}\]»>]*\)\=$'
110 let ind = ind + &sw 110 let ind = ind + shiftwidth()
111 endif 111 endif
112 if cline =~ '^\s*[)}\]»>]' 112 if cline =~ '^\s*[)}\]»>]'
113 let ind = ind - &sw 113 let ind = ind - shiftwidth()
114 endif 114 endif
115 115
116 " Indent lines that begin with 'or' or 'and' 116 " Indent lines that begin with 'or' or 'and'
117 if cline =~ '^\s*\(or\|and\)\>' 117 if cline =~ '^\s*\(or\|and\)\>'
118 if line !~ '^\s*\(or\|and\)\>' 118 if line !~ '^\s*\(or\|and\)\>'
119 let ind = ind + &sw 119 let ind = ind + shiftwidth()
120 endif 120 endif
121 elseif line =~ '^\s*\(or\|and\)\>' 121 elseif line =~ '^\s*\(or\|and\)\>'
122 let ind = ind - &sw 122 let ind = ind - shiftwidth()
123 endif 123 endif
124 124
125 return ind 125 return ind
126 126
127 endfunction 127 endfunction