diff options
author | ZyX <kp-pav@yandex.ru> | 2017-12-03 16:49:30 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-12-03 16:49:30 +0300 |
commit | c49e22d3964d6c7ae1c24e8ad01b5fec4ca40b57 (patch) | |
tree | b7e59c416d1435725c65f8952b6e55c70544d97e /runtime/indent/sml.vim | |
parent | 62108c3b0be46936c83f6d4c98b44ceb5e6f77fd (diff) | |
parent | 27a577586eace687c47e7398845178208cae524a (diff) | |
download | rneovim-c49e22d3964d6c7ae1c24e8ad01b5fec4ca40b57.tar.gz rneovim-c49e22d3964d6c7ae1c24e8ad01b5fec4ca40b57.tar.bz2 rneovim-c49e22d3964d6c7ae1c24e8ad01b5fec4ca40b57.zip |
Merge branch 'master' into s-dash-stdin
Diffstat (limited to 'runtime/indent/sml.vim')
-rw-r--r-- | runtime/indent/sml.vim | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/runtime/indent/sml.vim b/runtime/indent/sml.vim index fbbb15ed85..e760a8e350 100644 --- a/runtime/indent/sml.vim +++ b/runtime/indent/sml.vim @@ -115,9 +115,9 @@ function! GetSMLIndent() " Return double 'shiftwidth' after lines matching: if lline =~ '^\s*|.*=>\s*$' - return ind + &sw + &sw + return ind + 2 *shiftwidth() elseif lline =~ '^\s*val\>.*=\s*$' - return ind + &sw + return ind + shiftwidth() endif let line = getline(v:lnum) @@ -157,7 +157,7 @@ function! GetSMLIndent() if lastModule == -1 return 0 else - return lastModule + &sw + return lastModule + shiftwidth() endif " Indent lines starting with '|' from matching 'case', 'handle' @@ -172,7 +172,7 @@ function! GetSMLIndent() if switchLine =~ '\<case\>' return col(".") + 2 elseif switchLine =~ '\<handle\>' - return switchLineIndent + &sw + return switchLineIndent + shiftwidth() elseif switchLine =~ '\<datatype\>' call search('=') return col(".") - 1 @@ -184,7 +184,7 @@ function! GetSMLIndent() " Indent if last line ends with 'sig', 'struct', 'let', 'then', 'else', " 'in' elseif lline =~ '\<\(sig\|struct\|let\|in\|then\|else\)\s*$' - let ind = ind + &sw + let ind = ind + shiftwidth() " Indent if last line ends with 'of', align from 'case' elseif lline =~ '\<\(of\)\s*$' @@ -199,14 +199,14 @@ function! GetSMLIndent() " Indent if last line starts with 'fun', 'case', 'fn' elseif lline =~ '^\s*\(fun\|fn\|case\)\>' - let ind = ind + &sw + let ind = ind + shiftwidth() endif " Don't indent 'let' if last line started with 'fun', 'fn' if line =~ '^\s*let\>' if lline =~ '^\s*\(fun\|fn\)' - let ind = ind - &sw + let ind = ind - shiftwidth() endif endif |