Advertisement
Guest User

Untitled

a guest
Oct 17th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.78 KB | None | 0 0
  1. " actually run as vim, not vi
  2. set nocompatible
  3.  
  4. " 256-color terminal
  5. set t_Co=256
  6.  
  7. " utf-8 by default
  8. set encoding=utf-8
  9.  
  10. " vundle requires turning off filetypes momentarily
  11. filetype off
  12.  
  13. " include vundle on the runpath
  14. set rtp+=~/.vim/bundle/vundle/
  15.  
  16. " initialize vundle
  17. call vundle#rc()
  18.  
  19. " let vundle manage itself
  20. Bundle 'gmarik/vundle'
  21.  
  22. " ruby mode (might not be needed, w/ vim-rails?)
  23. Bundle 'vim-ruby/vim-ruby'
  24.  
  25. " better tab completion
  26. Bundle 'ervandew/supertab'
  27.  
  28. " erb support and the likes
  29. Bundle 'tpope/vim-rails'
  30.  
  31. " solarized color theme
  32. Bundle 'altercation/vim-colors-solarized'
  33.  
  34. " mustang theme
  35. Bundle 'croaker/mustang-vim'
  36.  
  37. " php mode stuff
  38. Bundle 'tobyS/vip'
  39.  
  40. " trailing whitespace annoyances
  41. Bundle 'bronson/vim-trailing-whitespace'
  42.  
  43. " git integration
  44. Bundle 'tpope/vim-fugitive'
  45.  
  46. " show current line and col in status bar
  47. set ruler
  48.  
  49. " show filename in status bar
  50. set title
  51.  
  52. " line numbers
  53. set number
  54.  
  55. " let vim do more at once, with a modern terminal
  56. set ttyfast
  57.  
  58. " always show current mode in status bar
  59. set showmode
  60.  
  61. " tab completion done better
  62. set wildmode=list:full
  63.  
  64. " allow opening new files while edits are kept
  65. set hidden
  66.  
  67. " highlight matches in search
  68. set hlsearch
  69.  
  70. " show matches while typing
  71. set incsearch
  72.  
  73. " fuck ~backup files
  74. set nobackup
  75.  
  76. " fuck ~backup files during editing
  77. set nowritebackup
  78.  
  79. " fuck .swp files
  80. set noswapfile
  81.  
  82. " force blank lines at end of file
  83. set eol
  84.  
  85. " disallow assumption of binary (noeol) mode
  86. set nobinary
  87.  
  88. " needed for most plugins to work
  89. filetype plugin indent on
  90.  
  91. " spaces, not tabs
  92. set expandtab
  93.  
  94. " not sure, will check
  95. set shiftwidth=2
  96.  
  97. " soft tabs are 2 spaces
  98. set softtabstop=2
  99.  
  100. " override tab settings for php
  101. augroup filetype_php
  102. autocmd!
  103. autocmd FileType php setlocal noexpandtab shiftwidth=2 tabstop=2
  104. augroup END
  105.  
  106. " allow syntaxes
  107. syntax on
  108.  
  109. " always show the status line
  110. set laststatus=2
  111.  
  112. " customize status line components
  113. set statusline=%<%f\ %h%m%r%=%{fugitive#statusline()}\ %-14.(%l,%c%V%)\ %P
  114.  
  115. " opening a file any buffer uses the pwd for that file
  116. set autochdir
  117.  
  118. " purdy colors
  119. set background=dark
  120. colorscheme mustang
  121.  
  122. " emacs user hangs head in shame: these are key-bindings for moving to ^/$ and
  123. " for cut/paste while in insert mode, same as emacs, readline, zsh, bash, OS X
  124. " undo/redo/visual select, I can live with switching to normal mode
  125. inoremap <C-a> <ESC>I
  126. inoremap <C-e> <ESC>A
  127.  
  128. " C-c usually by-passes the InsertLeave event
  129. inoremap <C-c> <ESC>
  130.  
  131. " make vim's regex interpretation friendlier (see :h pattern)
  132. nnoremap / /\v
  133. vnoremap / /\v
  134.  
  135. " ubuntu has some dumb sql plugin installed that breaks the arrow keys
  136. let g:omni_sql_no_default_maps = 1
  137.  
  138. " make status line red while in insert mode
  139. augroup hi_statusline
  140. autocmd!
  141. autocmd InsertEnter * hi StatusLine ctermbg=15 ctermfg=9
  142. autocmd InsertLeave * hi StatusLine ctermbg=238 ctermfg=253
  143. augroup END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement