diff options
Diffstat (limited to 'runtime/indent/dylan.vim')
-rw-r--r-- | runtime/indent/dylan.vim | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/indent/dylan.vim b/runtime/indent/dylan.vim index 0afcbeada7..6811ec4af5 100644 --- 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 |