Put this in .vimrc
fun! Four2Two() range
'<,'>s;^\(\s\+\);\=repeat(' ', len(submatch(0))/2);g
norm!gv
endfun
Select the code V
and apply it by :'<,'>call Four2Two()
filetype plugin indent on | |
syntax on | |
" ----- NOAUTOCOMMENT TO ALL FILES ----- | |
augroup AutoCommetDisable | |
autocmd! | |
" autocmd BufEnter * silent! lcd %:p:h | |
autocmd FileType * set formatoptions-=cro | |
augroup END |
Put this in .vimrc
fun! Four2Two() range
'<,'>s;^\(\s\+\);\=repeat(' ', len(submatch(0))/2);g
norm!gv
endfun
Select the code V
and apply it by :'<,'>call Four2Two()