Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. " Basics
  2. filetype plugin indent on
  3. syntax on
  4. set backspace=indent,eol,start
  5. set nowrap
  6. set ts=4
  7. set sw=4
  8. set expandtab
  9. retab
  10.  
  11. " Tell vim to handle gzip'd files
  12. :augroup gzip
  13. : autocmd!
  14. : autocmd BufReadPre,FileReadPre *.gz set bin
  15. : autocmd BufReadPost,FileReadPost *.gz '[,']!gunzip
  16. : autocmd BufReadPost,FileReadPost *.gz set nobin
  17. : autocmd BufReadPost,FileReadPost *.gz execute ":doautocmd BufReadPost " . expand("%:r")
  18. : autocmd BufWritePost,FileWritePost *.gz !mv <afile> <afile>:r
  19. : autocmd BufWritePost,FileWritePost *.gz !gzip <afile>:r
  20.  
  21. : autocmd FileAppendPre *.gz !gunzip <afile>
  22. : autocmd FileAppendPre *.gz !mv <afile>:r <afile>
  23. : autocmd FileAppendPost *.gz !mv <afile> <afile>:r
  24. : autocmd FileAppendPost *.gz !gzip <afile>:r
  25. :augroup END
  26.  
  27. " Tell vim to remember certain things when we exit
  28. " '10 : marks will be remembered for up to 10 previously edited files
  29. " "100 : will save up to 100 lines for each register
  30. " :20 : up to 20 lines of command-line history will be remembered
  31. " % : saves and restores the buffer list
  32. " n... : where to save the viminfo files
  33. set viminfo='10,\"100,:20,%,n~/.viminfo
  34.  
  35. autocmd BufNewFile,BufRead *.json set ft=javascript
  36.  
  37. function! ResCur()
  38. if line("'\"") <= line("$")
  39. normal! g`"
  40. return 1
  41. endif
  42. endfunction
  43.  
  44. augroup resCur
  45. autocmd!
  46. autocmd BufWinEnter * call ResCur()
  47. augroup END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement