diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2017-11-07 02:49:08 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-07 02:49:08 +0100 |
| commit | ad527392abb60e19954d5e8dba05af282d67d15b (patch) | |
| tree | 5a8ad20c8cc49b37593e8f1089420446b731b0d0 /runtime/indent/sml.vim | |
| parent | dc9290109481e5e0d0c224fecb217ceb5a4c978d (diff) | |
| parent | 20e317e22abeef20891eb70a18435559f7b09212 (diff) | |
| download | rneovim-ad527392abb60e19954d5e8dba05af282d67d15b.tar.gz rneovim-ad527392abb60e19954d5e8dba05af282d67d15b.tar.bz2 rneovim-ad527392abb60e19954d5e8dba05af282d67d15b.zip | |
Merge #7499 'vim-patch: runtime'
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 |
