Mercurial > vim
comparison runtime/indent/rpl.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 | fca8a9b65afa |
children | 5b7ea82bc18f |
comparison
equal
deleted
inserted
replaced
11517:01330ca5f7f8 | 11518:63b0b7b79b25 |
---|---|
1 " Vim indent file | 1 " Vim indent file |
2 " Language: RPL/2 | 2 " Language: RPL/2 |
3 " Version: 0.2 | 3 " Version: 0.2 |
4 " Last Change: 2005 Mar 28 | 4 " Last Change: 2017 Jun 13 |
5 " Maintainer: BERTRAND Joël <rpl2@free.fr> | 5 " Maintainer: BERTRAND Joël <rpl2@free.fr> |
6 | 6 |
7 " Only load this indent file when no other was loaded. | 7 " Only load this indent file when no other was loaded. |
8 if exists("b:did_indent") | 8 if exists("b:did_indent") |
9 finish | 9 finish |
30 " Add a shiftwidth to statements following if, iferr, then, else, elseif, | 30 " Add a shiftwidth to statements following if, iferr, then, else, elseif, |
31 " case, select, default, do, until, while, repeat, for, start | 31 " case, select, default, do, until, while, repeat, for, start |
32 if prevstat =~? '\<\(if\|iferr\|do\|while\)\>' && prevstat =~? '\<end\>' | 32 if prevstat =~? '\<\(if\|iferr\|do\|while\)\>' && prevstat =~? '\<end\>' |
33 elseif prevstat =~? '\(^\|\s\+\)<<\($\|\s\+\)' && prevstat =~? '\s\+>>\($\|\s\+\)' | 33 elseif prevstat =~? '\(^\|\s\+\)<<\($\|\s\+\)' && prevstat =~? '\s\+>>\($\|\s\+\)' |
34 elseif prevstat =~? '\<\(if\|iferr\|then\|else\|elseif\|select\|case\|do\|until\|while\|repeat\|for\|start\|default\)\>' || prevstat =~? '\(^\|\s\+\)<<\($\|\s\+\)' | 34 elseif prevstat =~? '\<\(if\|iferr\|then\|else\|elseif\|select\|case\|do\|until\|while\|repeat\|for\|start\|default\)\>' || prevstat =~? '\(^\|\s\+\)<<\($\|\s\+\)' |
35 let ind = ind + &sw | 35 let ind = ind + shiftwidth() |
36 endif | 36 endif |
37 | 37 |
38 " Subtract a shiftwidth from then, else, elseif, end, until, repeat, next, | 38 " Subtract a shiftwidth from then, else, elseif, end, until, repeat, next, |
39 " step | 39 " step |
40 let line = getline(v:lnum) | 40 let line = getline(v:lnum) |
41 if line =~? '^\s*\(then\|else\|elseif\|until\|repeat\|next\|step\|default\|end\)\>' | 41 if line =~? '^\s*\(then\|else\|elseif\|until\|repeat\|next\|step\|default\|end\)\>' |
42 let ind = ind - &sw | 42 let ind = ind - shiftwidth() |
43 elseif line =~? '^\s*>>\($\|\s\+\)' | 43 elseif line =~? '^\s*>>\($\|\s\+\)' |
44 let ind = ind - &sw | 44 let ind = ind - shiftwidth() |
45 endif | 45 endif |
46 | 46 |
47 return ind | 47 return ind |
48 endfunction | 48 endfunction |
49 | 49 |