Remove autocmd to right string white space
This commit is contained in:
parent
d494a0f543
commit
e049445284
@ -9,3 +9,12 @@ function! do#isort()
|
||||
call system('isort '.expand('%:p'))
|
||||
edit!
|
||||
endfunction
|
||||
|
||||
" TODO: Make do#rstrip_lines work on a range
|
||||
function! do#rstrip_lines()
|
||||
let l:line = line('.')
|
||||
let l:column = col('.')
|
||||
execute '%s/\s\+$//e'
|
||||
nohlsearch
|
||||
call cursor(l:line, l:column)
|
||||
endfunction
|
||||
|
@ -1 +1,3 @@
|
||||
command! ISort call do#isort()
|
||||
" TODO: Make RStripLines work on a range
|
||||
command! RStripLines call do#rstrip_lines()
|
||||
|
@ -39,21 +39,6 @@ function! s:Synstack()
|
||||
endfunction
|
||||
command Synstack :call s:Synstack()
|
||||
|
||||
" Strip trailing whitespace
|
||||
function! s:StripWhitespace()
|
||||
let l:line = line('.')
|
||||
let l:column = col('.')
|
||||
execute '%s/\s\+$//e'
|
||||
nohlsearch
|
||||
call cursor(l:line, l:column)
|
||||
endfunction
|
||||
command! StripWhitespace :call s:StripWhitespace()
|
||||
augroup strip_white_space
|
||||
" Strip whitespace on buffer write
|
||||
autocmd!
|
||||
autocmd BufWritePre * :call s:StripWhitespace()
|
||||
augroup END
|
||||
|
||||
" Stringify
|
||||
" Make a code block in to a C string literal
|
||||
function! s:Stringify()
|
||||
|
Loading…
x
Reference in New Issue
Block a user