blob: fc58c214e688d0dce758b83bc7012e7a17c18917 (
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
silent! substitute/\V./\='
' . indent . '.'/g
" Indent new lines
silent! '`+1,.>
endfunction
|