blob: 5ba523dbc8ca51212f0a36715b1d3f2a2bafbf09 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
function! 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
|