Adding UnAlign command
This commit is contained in:
parent
e812bf5427
commit
04ad1ceda1
9
.vim/functions.vim
Normal file
9
.vim/functions.vim
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
function! s:unalign() range
|
||||||
|
for l:line in range(a:firstline, a:lastline)
|
||||||
|
let l:text = getline(l:line)
|
||||||
|
let l:subst = substitute(l:text, '\(\S\+\)\s\{2,}', '\1 ', 'g')
|
||||||
|
call setline(l:line, l:subst)
|
||||||
|
endfor
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
command! -range UnAlign <line1>,<line2>call s:unalign()
|
Loading…
Reference in New Issue
Block a user