Move vim settings out of plugins to ensure they all get correctly loaded after everything else [Fix #373]

This commit is contained in:
Yan Pritzker
2013-10-21 16:10:40 -05:00
parent 65a3ec3219
commit 46946c9b8b
55 changed files with 15 additions and 8 deletions

View File

@@ -0,0 +1,15 @@
" via: http://rails-bestpractices.com/posts/60-remove-trailing-whitespace
" Strip trailing whitespace
function! <SID>StripTrailingWhitespaces()
" Preparation: save last search, and cursor position.
let _s=@/
let l = line(".")
let c = col(".")
" Do the business:
%s/\s\+$//e
" Clean up: restore previous search history, and cursor position
let @/=_s
call cursor(l, c)
endfunction
command! StripTrailingWhitespaces call <SID>StripTrailingWhitespaces()
nmap ,w :StripTrailingWhitespaces<CR>