mirror of
https://github.com/Raimondi/delimitMate.git
synced 2026-11-28 14:13:07 +08:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
becbd2d353 | ||
|
|
382c36bf57 |
@@ -483,8 +483,9 @@ function! delimitMate#ExpandReturn() "{{{
|
|||||||
" indentation is controlled by 'smartindent', and the first character on
|
" indentation is controlled by 'smartindent', and the first character on
|
||||||
" the new line is '}'. If this were typed manually it would reindent to
|
" the new line is '}'. If this were typed manually it would reindent to
|
||||||
" match the current line. Let's reproduce that behavior.
|
" match the current line. Let's reproduce that behavior.
|
||||||
let shifts = indent('.') / &sw
|
let sw = &sw == 0 ? &ts : &sw
|
||||||
let spaces = indent('.') - (shifts * &sw)
|
let shifts = indent('.') / sw
|
||||||
|
let spaces = indent('.') - (shifts * sw)
|
||||||
let val .= "^\<C-D>".repeat("\<C-T>", shifts).repeat(' ', spaces)
|
let val .= "^\<C-D>".repeat("\<C-T>", shifts).repeat(' ', spaces)
|
||||||
endif
|
endif
|
||||||
" Expand:
|
" Expand:
|
||||||
|
|||||||
Reference in new issue
Block a user