.vimrc 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. " File: .vimrc
  2. " Author: Jake Zimmerman <jake@zimmerman.io>
  3. "
  4. " How I configure Vim :P
  5. "
  6. " Gotta be first
  7. set nocompatible
  8. filetype off
  9. set rtp+=~/.vim/bundle/Vundle.vim
  10. call vundle#begin()
  11. Plugin 'VundleVim/Vundle.vim'
  12. " ----- Making Vim look good ------------------------------------------
  13. Plugin 'altercation/vim-colors-solarized'
  14. Plugin 'tomasr/molokai'
  15. Plugin 'vim-airline/vim-airline'
  16. Plugin 'vim-airline/vim-airline-themes'
  17. " ----- Vim as a programmer's text editor -----------------------------
  18. Plugin 'scrooloose/nerdtree'
  19. Plugin 'jistr/vim-nerdtree-tabs'
  20. Plugin 'vim-syntastic/syntastic'
  21. Plugin 'xolox/vim-misc'
  22. Plugin 'xolox/vim-easytags'
  23. Plugin 'majutsushi/tagbar'
  24. Plugin 'ctrlpvim/ctrlp.vim'
  25. Plugin 'vim-scripts/a.vim'
  26. " ----- Working with Git ----------------------------------------------
  27. Plugin 'airblade/vim-gitgutter'
  28. Plugin 'tpope/vim-fugitive'
  29. " ----- Other text editing features -----------------------------------
  30. Plugin 'Raimondi/delimitMate'
  31. " ----- man pages, tmux -----------------------------------------------
  32. Plugin 'jez/vim-superman'
  33. Plugin 'christoomey/vim-tmux-navigator'
  34. " ----- Syntax plugins ------------------------------------------------
  35. Plugin 'jez/vim-c0'
  36. Plugin 'jez/vim-ispc'
  37. Plugin 'kchmck/vim-coffee-script'
  38. " ---- Extras/Advanced plugins ----------------------------------------
  39. " Highlight and strip trailing whitespace
  40. "Plugin 'ntpeters/vim-better-whitespace'
  41. " Easily surround chunks of text
  42. "Plugin 'tpope/vim-surround'
  43. " Align CSV files at commas, align Markdown tables, and more
  44. "Plugin 'godlygeek/tabular'
  45. " Automaticall insert the closing HTML tag
  46. "Plugin 'HTML-AutoCloseTag'
  47. " Make tmux look like vim-airline (read README for extra instructions)
  48. "Plugin 'edkolev/tmuxline.vim'
  49. " All the other syntax plugins I use
  50. "Plugin 'ekalinin/Dockerfile.vim'
  51. "Plugin 'digitaltoad/vim-jade'
  52. "Plugin 'tpope/vim-liquid'
  53. "Plugin 'cakebaker/scss-syntax.vim'
  54. call vundle#end()
  55. filetype plugin indent on
  56. " --- General settings ---
  57. set backspace=indent,eol,start
  58. set ruler
  59. set number
  60. set showcmd
  61. set incsearch
  62. set hlsearch
  63. syntax on
  64. set mouse=a
  65. " We need this for plugins like Syntastic and vim-gitgutter which put symbols
  66. " in the sign column.
  67. hi clear SignColumn
  68. " ----- Plugin-Specific Settings --------------------------------------
  69. " ----- altercation/vim-colors-solarized settings -----
  70. " Toggle this to "light" for light colorscheme
  71. set background=dark
  72. " Uncomment the next line if your terminal is not configured for solarized
  73. let g:solarized_termcolors=256
  74. " Set the colorscheme
  75. colorscheme solarized
  76. " ----- bling/vim-airline settings -----
  77. " Always show statusbar
  78. set laststatus=2
  79. " Fancy arrow symbols, requires a patched font
  80. " To install a patched font, run over to
  81. " https://github.com/abertsch/Menlo-for-Powerline
  82. " download all the .ttf files, double-click on them and click "Install"
  83. " Finally, uncomment the next line
  84. "let g:airline_powerline_fonts = 1
  85. " Show PASTE if in paste mode
  86. let g:airline_detect_paste=1
  87. " Show airline for tabs too
  88. let g:airline#extensions#tabline#enabled = 1
  89. " Use the solarized theme for the Airline status bar
  90. let g:airline_theme='solarized'
  91. " ----- jistr/vim-nerdtree-tabs -----
  92. " Open/close NERDTree Tabs with \t
  93. nmap <silent> <leader>t :NERDTreeTabsToggle<CR>
  94. " To have NERDTree always open on startup
  95. let g:nerdtree_tabs_open_on_console_startup = 1
  96. " ----- scrooloose/syntastic settings -----
  97. let g:syntastic_error_symbol = '✘'
  98. let g:syntastic_warning_symbol = "▲"
  99. augroup mySyntastic
  100. au!
  101. au FileType tex let b:syntastic_mode = "passive"
  102. augroup END
  103. " ----- xolox/vim-easytags settings -----
  104. " Where to look for tags files
  105. set tags=./tags;,~/.vimtags
  106. " Sensible defaults
  107. let g:easytags_events = ['BufReadPost', 'BufWritePost']
  108. let g:easytags_async = 1
  109. let g:easytags_dynamic_files = 2
  110. let g:easytags_resolve_links = 1
  111. let g:easytags_suppress_ctags_warning = 1
  112. " ----- majutsushi/tagbar settings -----
  113. " Open/close tagbar with \b
  114. nmap <silent> <leader>b :TagbarToggle<CR>
  115. " Uncomment to open tagbar automatically whenever possible
  116. "autocmd BufEnter * nested :call tagbar#autoopen(0)
  117. " ----- airblade/vim-gitgutter settings -----
  118. " In vim-airline, only display "hunks" if the diff is non-zero
  119. let g:airline#extensions#hunks#non_zero_only = 1
  120. " ----- Raimondi/delimitMate settings -----
  121. let delimitMate_expand_cr = 1
  122. augroup mydelimitMate
  123. au!
  124. au FileType markdown let b:delimitMate_nesting_quotes = ["`"]
  125. au FileType tex let b:delimitMate_quotes = ""
  126. au FileType tex let b:delimitMate_matchpairs = "(:),[:],{:},`:'"
  127. au FileType python let b:delimitMate_nesting_quotes = ['"', "'"]
  128. augroup END
  129. " ----- jez/vim-superman settings -----
  130. " better man page support
  131. noremap K :SuperMan <cword><CR>