diff --git a/autoload/delimitMate.vim b/autoload/delimitMate.vim index e6e3a0c..e063c88 100644 --- a/autoload/delimitMate.vim +++ b/autoload/delimitMate.vim @@ -483,8 +483,9 @@ function! delimitMate#ExpandReturn() "{{{ " indentation is controlled by 'smartindent', and the first character on " the new line is '}'. If this were typed manually it would reindent to " match the current line. Let's reproduce that behavior. - let shifts = indent('.') / &sw - let spaces = indent('.') - (shifts * &sw) + let sw = &sw == 0 ? &ts : &sw + let shifts = indent('.') / sw + let spaces = indent('.') - (shifts * sw) let val .= "^\".repeat("\", shifts).repeat(' ', spaces) endif " Expand: