.vimrc 637 B

12345678910111213
  1. set encoding=utf-8
  2. set directory=~/.vim/swp " *.swp files will end up here
  3. """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  4. " When editing a file, always jump to the last known cursor position.
  5. """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  6. autocmd BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g`\"" | endif
  7. """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  8. " Delete trailing whitespaces on saving a file
  9. """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  10. autocmd BufWritePre * :%s/\s\+$//e