" SpacesToTabs {{{ " TODO - ake a proper regex substitution function! s:spacestotabs() %s/^ / /e %s/^ / /e %s/^ / /e %s/^ / /e %s/^ / /e %s/^ / /e endfunction command SpacesToTabs call s:spacestotabs() "}}} " TrimWhitespace {{{ command! -range=% TrimWhitespace let b:wv = winsaveview() | \ keeppattern ,s/\s\+$// | \ call winrestview(b:wv) "}}} " Scratch, ScratchVertical {{{ command! Scratch new | setlocal buftype=nofile | setlocal bufhidden=hide | setlocal noswapfile command! ScratchVertical vnew | setlocal buftype=nofile | setlocal bufhidden=hide | setlocal noswapfile "}}} " "