Mercurial > vim
comparison runtime/indent/sdl.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 | 7ffc704cb7c1 |
children | 9c221ad9634a |
comparison
equal
deleted
inserted
replaced
11517:01330ca5f7f8 | 11518:63b0b7b79b25 |
---|---|
44 | 44 |
45 " Add a 'shiftwidth' after states, different blocks, decision (and alternatives), inputs | 45 " Add a 'shiftwidth' after states, different blocks, decision (and alternatives), inputs |
46 if (getline(lnum) =~? '^\s*\(start\|state\|system\|package\|connection\|channel\|alternative\|macro\|operator\|newtype\|select\|substructure\|decision\|generator\|refinement\|service\|method\|exceptionhandler\|asntype\|syntype\|value\|(.*):\|\(priority\s\+\)\=input\|provided\)' | 46 if (getline(lnum) =~? '^\s*\(start\|state\|system\|package\|connection\|channel\|alternative\|macro\|operator\|newtype\|select\|substructure\|decision\|generator\|refinement\|service\|method\|exceptionhandler\|asntype\|syntype\|value\|(.*):\|\(priority\s\+\)\=input\|provided\)' |
47 \ || getline(lnum) =~? virtuality . '\(process\|procedure\|block\|object\)') | 47 \ || getline(lnum) =~? virtuality . '\(process\|procedure\|block\|object\)') |
48 \ && getline(lnum) !~? 'end[[:alpha:]]\+;$' | 48 \ && getline(lnum) !~? 'end[[:alpha:]]\+;$' |
49 let ind = ind + &sw | 49 let ind = ind + shiftwidth() |
50 endif | 50 endif |
51 | 51 |
52 " Subtract a 'shiftwidth' after states | 52 " Subtract a 'shiftwidth' after states |
53 if getline(lnum) =~? '^\s*\(stop\|return\>\|nextstate\)' | 53 if getline(lnum) =~? '^\s*\(stop\|return\>\|nextstate\)' |
54 let ind = ind - &sw | 54 let ind = ind - shiftwidth() |
55 endif | 55 endif |
56 | 56 |
57 " Subtract a 'shiftwidth' on on end (uncompleted line) | 57 " Subtract a 'shiftwidth' on on end (uncompleted line) |
58 if getline(v:lnum) =~? '^\s*end\>' | 58 if getline(v:lnum) =~? '^\s*end\>' |
59 let ind = ind - &sw | 59 let ind = ind - shiftwidth() |
60 endif | 60 endif |
61 | 61 |
62 " Put each alternatives where the corresponding decision was | 62 " Put each alternatives where the corresponding decision was |
63 if getline(v:lnum) =~? '^\s*\((.*)\|else\):' | 63 if getline(v:lnum) =~? '^\s*\((.*)\|else\):' |
64 normal k | 64 normal k |