Mercurial > vim
diff runtime/indent/matlab.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 | 8b334e4cb97f |
line wrap: on
line diff
--- a/runtime/indent/matlab.vim +++ b/runtime/indent/matlab.vim @@ -44,9 +44,9 @@ function GetMatlabIndent(lnum) " See if this line does not follow the line right after an openblock if getline(plnum) =~ '^\s*\(for\|if\|else\|elseif\|case\|while\|switch\|try\|otherwise\|catch\)\>' " See if the user has already dedented - elseif indent(v:lnum) > curind - &sw + elseif indent(v:lnum) > curind - shiftwidth() " If not, recommend one dedent - let curind = curind - &sw + let curind = curind - shiftwidth() else " Otherwise, trust the user return -1 @@ -56,9 +56,9 @@ function GetMatlabIndent(lnum) " If the previous line opened a block elseif getline(plnum) =~ '^\s*\(for\|if\|else\|elseif\|case\|while\|switch\|try\|otherwise\|catch\)\>' " See if the user has already indented - if indent(v:lnum) < curind + &sw + if indent(v:lnum) < curind + shiftwidth() "If not, recommend indent - let curind = curind + &sw + let curind = curind + shiftwidth() else " Otherwise, trust the user return -1