move commands to separate file
This commit is contained in:
parent
ca70b402c4
commit
d389e1fed1
|
@ -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 <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
|
||||
"}}}
|
||||
"
|
||||
"
|
||||
|
|
11
init.vim
11
init.vim
|
@ -181,17 +181,6 @@ function! ToggleHighlights() abort "{{{
|
|||
endfunction
|
||||
"}}}
|
||||
"----------------------------------------------------------------------------}}}
|
||||
"#commands{{{
|
||||
" 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
|
||||
"}}}
|
||||
"}}}
|
||||
" #settings {{{
|
||||
|
||||
scriptencoding utf-8
|
||||
|
|
Loading…
Reference in New Issue