Advertisement
Guest User

Untitled

a guest
Jan 12th, 2014
651
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. set nocompatible
  2. filetype off "required for vundle
  3. call pathogen#infect()
  4. set rtp+=~/.vim/bundle/vundle/
  5. call vundle#rc()
  6. Bundle 'gmarik/vundle'
  7. Bundle 'Valloric/YouCompleteMe'
  8. filetype plugin indent on "required for vundle
  9. filetype on "now that vundle is over
  10. set softtabstop=2
  11. set tabstop=2
  12. set shiftwidth=2
  13. set expandtab
  14. set guioptions-=T
  15. set guioptions+=e
  16. set t_Co=256
  17. set mouse=a
  18. syntax enable
  19. set guitablabel=%M\ %t
  20. set ruler
  21. set nowrap
  22. set autoindent
  23. set smartindent
  24. set number
  25. set ignorecase
  26. set smartcase
  27. set hlsearch
  28. set incsearch
  29. set undolevels=100
  30. set history=250
  31. set title
  32. set novisualbell
  33. set noerrorbells
  34. set nobackup
  35. set pastetoggle=<F3>
  36. set laststatus=2
  37. set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l
  38. set magic "for regex pattern matching
  39. set background=dark "for better solarized
  40. colorscheme solarized
  41. "highlight tabs(\t char)
  42. syn match tab display "\t"
  43. hi link tab Error
  44. "eliminate traling whitespaces
  45. fun! <SID>StripTrailingWhitespaces()
  46. let l = line(".")
  47. let c = col(".")
  48. %s/\s\+$//e
  49. call cursor(l, c)
  50. endfun
  51. " kill any trailing whitespace on save
  52. autocmd FileType c,cabal,cpp,haskell,javascript,php,python,readme,text
  53. \ autocmd BufWritePre <buffer>
  54. \ :call <SID>StripTrailingWhitespaces()
  55.  
  56. function! HasPaste()
  57. if &paste
  58. return 'PASTE MODE '
  59. en
  60. return ''
  61. endfunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement