2021-09-08 21:22:51 +00:00
|
|
|
" SpacesToTabs {{{
|
|
|
|
" TODO - ake a proper regex substitution
|
2021-09-08 16:08:30 +00:00
|
|
|
function! s:spacestotabs()
|
|
|
|
%s/^ / /e
|
|
|
|
%s/^ / /e
|
|
|
|
%s/^ / /e
|
|
|
|
%s/^ / /e
|
|
|
|
%s/^ / /e
|
|
|
|
%s/^ / /e
|
|
|
|
endfunction
|
|
|
|
command SpacesToTabs call s:spacestotabs()
|
2021-09-08 21:22:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
"}}}
|
|
|
|
" TrimWhitespace {{{
|
|
|
|
command! -range=% TrimWhitespace let b:wv = winsaveview() |
|
|
|
|
\ keeppattern <line1>,<line2>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
|
|
|
|
"}}}
|
|
|
|
"
|
|
|
|
"
|