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/ada.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/ada.vim')
-rw-r--r-- | runtime/indent/ada.vim | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/runtime/indent/ada.vim b/runtime/indent/ada.vim index 575f326454..1ca7fbacbe 100644 --- a/runtime/indent/ada.vim +++ b/runtime/indent/ada.vim @@ -87,7 +87,7 @@ function s:MainBlockIndent (prev_indent, prev_lnum, blockstart, stop_at) endwhile endwhile " Fallback - just move back one - return a:prev_indent - &sw + return a:prev_indent - shiftwidth() endfunction MainBlockIndent " Section: s:EndBlockIndent {{{1 @@ -131,7 +131,7 @@ function s:EndBlockIndent( prev_indent, prev_lnum, blockstart, blockend ) endwhile endwhile " Fallback - just move back one - return a:prev_indent - &sw + return a:prev_indent - shiftwidth() endfunction EndBlockIndent " Section: s:StatementIndent {{{1 @@ -213,15 +213,15 @@ function GetAdaIndent() endif " Move indent in if ! false_match - let ind = ind + &sw + let ind = ind + shiftwidth() endif elseif line =~ '^\s*\(case\|exception\)\>' " Move indent in twice (next 'when' will move back) - let ind = ind + 2 * &sw + let ind = ind + 2 * shiftwidth() elseif line =~ '^\s*end\s*record\>' - " Move indent back to tallying 'type' preceding the 'record'. + " Move indent back to tallying 'type' preceeding the 'record'. " Allow indent to be equal to 'end record's. - let ind = s:MainBlockIndent( ind+&sw, lnum, 'type\>', '' ) + let ind = s:MainBlockIndent( ind+shiftwidth(), lnum, 'type\>', '' ) elseif line =~ '\(^\s*new\>.*\)\@<!)\s*[;,]\s*$' " Revert to indent of line that started this parenthesis pair exe lnum @@ -235,10 +235,10 @@ function GetAdaIndent() exe v:lnum elseif line =~ '[.=(]\s*$' " A statement continuation - move in one - let ind = ind + &sw + let ind = ind + shiftwidth() elseif line =~ '^\s*new\>' " Multiple line generic instantiation ('package blah is\nnew thingy') - let ind = s:StatementIndent( ind - &sw, lnum ) + let ind = s:StatementIndent( ind - shiftwidth(), lnum ) elseif line =~ ';\s*$' " Statement end (but not 'end' ) - try to find current statement-start indent let ind = s:StatementIndent( ind, lnum ) @@ -256,17 +256,17 @@ function GetAdaIndent() elseif continuation && line =~ '^\s*(' " Don't do this if we've already indented due to the previous line if ind == initind - let ind = ind + &sw + let ind = ind + shiftwidth() endif elseif line =~ '^\s*\(begin\|is\)\>' let ind = s:MainBlockIndent( ind, lnum, '\(procedure\|function\|declare\|package\|task\)\>', 'begin\>' ) elseif line =~ '^\s*record\>' - let ind = s:MainBlockIndent( ind, lnum, 'type\>\|for\>.*\<use\>', '' ) + &sw + let ind = s:MainBlockIndent( ind, lnum, 'type\>\|for\>.*\<use\>', '' ) + shiftwidth() elseif line =~ '^\s*\(else\|elsif\)\>' let ind = s:MainBlockIndent( ind, lnum, 'if\>', '' ) elseif line =~ '^\s*when\>' " Align 'when' one /in/ from matching block start - let ind = s:MainBlockIndent( ind, lnum, '\(case\|exception\)\>', '' ) + &sw + let ind = s:MainBlockIndent( ind, lnum, '\(case\|exception\)\>', '' ) + shiftwidth() elseif line =~ '^\s*end\>\s*\<if\>' " End of if statements let ind = s:EndBlockIndent( ind, lnum, 'if\>', 'end\>\s*\<if\>' ) |