aboutsummaryrefslogtreecommitdiff
path: root/runtime/indent/logtalk.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/indent/logtalk.vim')
-rw-r--r--runtime/indent/logtalk.vim12
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/indent/logtalk.vim b/runtime/indent/logtalk.vim
index 99e6ec896b..5b69663e1d 100644
--- 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