Guest User

Untitled

a guest
May 23rd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. " defaults
  2. :set ts=4 sw=4 noet ai
  3.  
  4. :set pastetoggle=<F8>
  5. :set background=dark
  6. :set nowrap
  7. :set hlsearch
  8. :set viminfo='20,<1000
  9.  
  10. " disable the annoying HTML link underlining
  11. :hi link htmlLink NONE
  12. :hi link htmlItalic NONE
  13.  
  14. " enable mouse
  15. :set mouse=a
  16.  
  17. " Switch syntax highlighting on, when the terminal has colors
  18. if &t_Co > 2 || has("gui_running")
  19. syntax on
  20. endif
  21.  
  22. " set some custom tab spacings
  23. autocmd BufRead *.xml set ts=2 sw=2 noet
  24. autocmd BufRead *.xsl set ts=2 sw=2 noet
  25. autocmd BufRead *.php set ts=4 sw=4 noet
  26. autocmd BufRead *.tpl set ts=2 sw=2 noet
  27. autocmd BufRead *.py set ts=4 sw=4 et
  28. autocmd BufRead *.rb set ts=2 sw=2 et
  29. autocmd BufRead *.html.erb set ts=2 sw=2 et
  30.  
  31. " Automatically chmod +x Shell and Perl scripts
  32. "autocmd BufWritePost *.sh !chmod +x %
  33. "autocmd BufWritePost *.pl !chmod +x %
  34.  
  35. " don't show help when F1 is pressed
  36. map <F1> <ESC>
  37. "ignoremap <F1> <ESC>
  38.  
  39. "Open file at last edited location
  40. au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") |
  41. \ exe "normal g'\"" | endif
  42.  
  43. "---------+
  44. " Comments \
  45. "-----------+
  46.  
  47. map ,# :s/^/#/<CR>
  48. map ,/ :s/^/\/\//<CR>
  49. map ,> :s/^/> /<CR>
  50. map ,! :s/^/!/<CR>
  51. map ,; :s/^/;/<CR>
  52. map ,- :s/^/--/<CR>
  53. map ,c :s/^\/\/\\|^--\\|^> \\|^[#"%!;]//<CR>
  54.  
  55. " Common Command Typos
  56. command! Q quit " converts ... :Q => :q
  57. command! W write " converts ... :W => :w
  58. command! Wq wq " converts ... :Wq => :wq
  59. command! Wn wn " converts ... :Wn => :wn
  60. command! WN wN " converts ... :WN => :wN
  61.  
  62. set dictionary-=~/funclist.txt dictionary+=~/funclist.txt
  63. set complete-=k complete+=k
Add Comment
Please, Sign In to add comment