From 418e08aa788e45579f9a89225a8bd5baecd2527e Mon Sep 17 00:00:00 2001 From: Von Random Date: Mon, 20 Apr 2015 14:01:55 +0300 Subject: [PATCH] removing trailing spaces on exit takes time, so we are better off without it =/ --- vimrc | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/vimrc b/vimrc index df587f6..15a083f 100644 --- a/vimrc +++ b/vimrc @@ -37,16 +37,17 @@ autocmd BufNewFile *.rb 0put =\"#!/usr/bin/env ruby\\"|$ autocmd BufNewFile *.py 0put =\"#!/usr/bin/env python3\\"|$ autocmd BufNewFile *.pl 0put =\"#!/usr/bin/env perl\\use strict;\\use warnings;\\use feature 'say';\\"|$ -" remove trailing spaces and tabs on exit -function! StripTrailingWhitespaces() - let l = line(".") - let c = col(".") - %s/\s\+$//e - call cursor(l, c) - unlet l - unlet c -endfunction -autocmd BufWritePre * :call StripTrailingWhitespaces() +" remove trailing spaces and tabs on exit - apparently takes a shit ton of +" time to close the document, so no, let us keep it out of business for now +"function! StripTrailingWhitespaces() +" let l = line(".") +" let c = col(".") +" %s/\s\+$//e +" call cursor(l, c) +" unlet l +" unlet c +"endfunction +"autocmd BufWritePre * :call StripTrailingWhitespaces() " maps let mapleader = ","