removing trailing spaces on exit takes time, so we are better off without it =/
This commit is contained in:
parent
f216b382ee
commit
418e08aa78
1 changed files with 11 additions and 10 deletions
21
vimrc
21
vimrc
|
@ -37,16 +37,17 @@ autocmd BufNewFile *.rb 0put =\"#!/usr/bin/env ruby\<nl>\"|$
|
||||||
autocmd BufNewFile *.py 0put =\"#!/usr/bin/env python3\<nl>\"|$
|
autocmd BufNewFile *.py 0put =\"#!/usr/bin/env python3\<nl>\"|$
|
||||||
autocmd BufNewFile *.pl 0put =\"#!/usr/bin/env perl\<nl>\use strict;\<nl>\use warnings;\<nl>\use feature 'say';\<nl>\"|$
|
autocmd BufNewFile *.pl 0put =\"#!/usr/bin/env perl\<nl>\use strict;\<nl>\use warnings;\<nl>\use feature 'say';\<nl>\"|$
|
||||||
|
|
||||||
" remove trailing spaces and tabs on exit
|
" remove trailing spaces and tabs on exit - apparently takes a shit ton of
|
||||||
function! <SID>StripTrailingWhitespaces()
|
" time to close the document, so no, let us keep it out of business for now
|
||||||
let l = line(".")
|
"function! <SID>StripTrailingWhitespaces()
|
||||||
let c = col(".")
|
" let l = line(".")
|
||||||
%s/\s\+$//e
|
" let c = col(".")
|
||||||
call cursor(l, c)
|
" %s/\s\+$//e
|
||||||
unlet l
|
" call cursor(l, c)
|
||||||
unlet c
|
" unlet l
|
||||||
endfunction
|
" unlet c
|
||||||
autocmd BufWritePre * :call <SID>StripTrailingWhitespaces()
|
"endfunction
|
||||||
|
"autocmd BufWritePre * :call <SID>StripTrailingWhitespaces()
|
||||||
|
|
||||||
" maps
|
" maps
|
||||||
let mapleader = ","
|
let mapleader = ","
|
||||||
|
|
Loading…
Reference in a new issue