diff --git a/init.commands.vim b/init.commands.vim index 451427d..418e83d 100644 --- a/init.commands.vim +++ b/init.commands.vim @@ -1,3 +1,5 @@ +" SpacesToTabs {{{ +" TODO - ake a proper regex substitution function! s:spacestotabs() %s/^ / /e %s/^ / /e @@ -7,3 +9,19 @@ function! s:spacestotabs() %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 +"}}} +" +" diff --git a/init.vim b/init.vim index 0ee58e8..3c751b8 100644 --- a/init.vim +++ b/init.vim @@ -181,17 +181,6 @@ function! ToggleHighlights() abort "{{{ endfunction "}}} "----------------------------------------------------------------------------}}} -"#commands{{{ -" 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 -"}}} -"}}} " #settings {{{ scriptencoding utf-8