Mercurial > vim
diff runtime/indent/dylan.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 | 3fc0f57ecb91 |
children | 9c221ad9634a |
line wrap: on
line diff
--- a/runtime/indent/dylan.vim +++ b/runtime/indent/dylan.vim @@ -1,7 +1,7 @@ " Vim indent file " Language: Dylan " Version: 0.01 -" Last Change: 2003 Feb 04 +" Last Change: 2017 Jun 13 " Maintainer: Brent A. Fulgham <bfulgham@debian.org> " Only load this indent file when no other was loaded. @@ -45,13 +45,13 @@ function DylanGetIndent() " If previous line was a 'define', indent if prevline =~? '\(^\s*\(begin\|block\|case\|define\|else\|elseif\|for\|finally\|if\|select\|unless\|while\)\|\s*\S*\s*=>$\)' - let chg = &sw + let chg = shiftwidth() " local methods indent the shift-width, plus 6 for the 'local' elseif prevline =~? '^\s*local' - let chg = &sw + 6 + let chg = shiftwidth() + 6 " If previous line was a let with no closing semicolon, indent elseif prevline =~? '^\s*let.*[^;]\s*$' - let chg = &sw + let chg = shiftwidth() " If previous line opened a parenthesis, and did not close it, indent elseif prevline =~ '^.*(\s*[^)]*\((.*)\)*[^)]*$' return = match( prevline, '(.*\((.*)\|[^)]\)*.*$') + 1 @@ -75,13 +75,13 @@ function DylanGetIndent() " line doesn't start with an indentable command: let curr_str = getline(curr_line) if curr_str =~? '^\s*\(begin\|block\|case\|define\|else\|elseif\|for\|finally\|if\|select\|unless\|while\)' - let chg = &sw + let chg = shiftwidth() endif endif " If a line starts with end, un-indent (even if we just indented!) if cline =~? '^\s*\(cleanup\|end\|else\|elseif\|exception\|finally\|otherwise\)' - let chg = chg - &sw + let chg = chg - shiftwidth() endif return ind + chg