Adding UnAlign command

This commit is contained in:
Alex Yatskov 2015-02-18 18:25:46 +09:00
parent e812bf5427
commit 04ad1ceda1
2 changed files with 10 additions and 0 deletions

9
.vim/functions.vim Normal file
View 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()

1
.vimrc
View File

@ -3,3 +3,4 @@ set runtimepath+=~/.vim
runtime plugins.vim
runtime options.vim
runtime keymaps.vim
runtime functions.vim