Mercurial > vim
diff runtime/indent/logtalk.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 | 0b796e045c42 |
children | 5c5908e81e93 |
line wrap: on
line diff
--- a/runtime/indent/logtalk.vim +++ b/runtime/indent/logtalk.vim @@ -38,24 +38,24 @@ function! GetLogtalkIndent() endif " Check for entity opening directive on previous line if pline =~ '^\s*:-\s\(object\|protocol\|category\)\ze(.*,$' - let ind = ind + &sw + let ind = ind + shiftwidth() " Check for clause head on previous line elseif pline =~ ':-\s*\(%.*\)\?$' - let ind = ind + &sw + let ind = ind + shiftwidth() " Check for entity closing directive on previous line elseif pline =~ '^\s*:-\send_\(object\|protocol\|category\)\.\(%.*\)\?$' - let ind = ind - &sw + let ind = ind - shiftwidth() " Check for end of clause on previous line elseif pline =~ '\.\s*\(%.*\)\?$' - let ind = ind - &sw + let ind = ind - shiftwidth() endif " Check for opening conditional on previous line if pline =~ '^\s*\([(;]\|->\)' && pline !~ '\.\s*\(%.*\)\?$' && pline !~ '^.*\([)][,]\s*\(%.*\)\?$\)' - let ind = ind + &sw + let ind = ind + shiftwidth() endif " Check for closing an unclosed paren, or middle ; or -> if line =~ '^\s*\([);]\|->\)' - let ind = ind - &sw + let ind = ind - shiftwidth() endif return ind endfunction