blob: 9e7e00b8633d7ae0f49cbdcf836106955b2673a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
function! whitespace_method_chain#SplitMethodChainToMultipleLines()
normal! m`
let line = getline('.')
let indent = matchstr(line, '\v^\s+')
" Replace '.' with newlines and the correct amount of indentation
substitute/\V./\='
' . indent . '.'/g
" Indent new lines
'`+1,.>
endfunction
|