1
0

vimrc 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. set nocompatible " be iMproved, required
  2. filetype off " required
  3. " set the runtime path to include Vundle and initialize
  4. set rtp+=~/.vim/bundle/Vundle.vim
  5. call vundle#begin()
  6. " let Vundle manage Vundle, required
  7. Plugin 'gmarik/Vundle.vim'
  8. Plugin 'Valloric/YouCompleteMe'
  9. Plugin 'majutsushi/tagbar'
  10. Plugin 'scrooloose/nerdtree'
  11. Plugin 'tpope/vim-fugitive'
  12. Plugin 'airblade/vim-gitgutter'
  13. " Define runtime-path (rtp) if there is no explicit repo for vim
  14. Plugin 'chriskempson/tomorrow-theme', {'rtp': 'vim/'}
  15. Plugin 'altercation/vim-colors-solarized'
  16. Plugin 'bling/vim-airline'
  17. " all three following plugins are needed for vim-snipmate
  18. Bundle "MarcWeber/vim-addon-mw-utils"
  19. Bundle "tomtom/tlib_vim"
  20. Bundle "garbas/vim-snipmate"
  21. " All of your Plugins must be added before the following line
  22. call vundle#end() " required
  23. filetype plugin indent on " required
  24. " U S E R S E T U P
  25. "set right encoding
  26. set encoding=utf-8
  27. set fileencoding=utf-8
  28. "use jk for Escape
  29. inoremap jk <ESC>
  30. map j gj
  31. map k gk
  32. "lajdflasldflsajflasdlfjslajfsjremap mapleader / to , this vim stuff ist really not thaaaat comfortable if
  33. "you are not used to it O.o
  34. let mapleader = ","
  35. "execute current file
  36. nnoremap <leader>e :!%:p<Enter>
  37. "open Nerdtree with CTRL+n
  38. map <C-n> :NERDTreeToggle<CR>
  39. "open Tagbar with CTRL+m
  40. map <C-m> :TagbarToggle<CR>
  41. " trigger snipmate
  42. imap kj <Plug>snipMateNextOrTrigger
  43. "configure for guivim if its active
  44. if has("gui_macvim")
  45. set guifont=Meslo\ LG\ M\ for\ Powerline:h13
  46. endif
  47. "Set auto inline on
  48. set ai
  49. "Show line numbers
  50. set number
  51. "Set syntax highlighting on
  52. syntax on
  53. " Spaces instead of Tabs
  54. " Use 4 Spaces as default and 2 Spaces for cpp files
  55. if expand("%:e")=="cpp"
  56. set tabstop=2
  57. set shiftwidth=2
  58. else
  59. set tabstop=4
  60. set shiftwidth=4
  61. endif
  62. set expandtab
  63. "Tomorrow color scheme
  64. colo Tomorrow-Night-Eighties
  65. " Close tip-window when selection is done or leaving insert mode
  66. "autocmd CursorMovedI * if pumvisible() == 0|pclose|endif
  67. "autocmd InsertLeave * if pumvisible() == 0|pclose|endif
  68. " YCM Configuration
  69. " dont use python-mode autocomplete obsolete now, because of YCM
  70. let g:ycm_filetype_whitelist = {'cpp': 1}
  71. " set ycm_extra_conf
  72. let g:ycm_global_ycm_extra_conf = '~/.ycm_extra_conf.py'
  73. " turn off the ycm diagnostic because of struggling with root
  74. "let g:ycm_show_diagnostics_ui = 0
  75. " NERDTree Configuration
  76. " hide some fileextenxions
  77. let NERDTreeIgnore = ['\.pyc$']
  78. " Airline stuff
  79. set laststatus=2
  80. let g:airline_powerline_fonts = 1
  81. let g:airline#extensions#tabline#enabled = 1
  82. let g:airline#extensions#tabline#buffer_nr_show = 1
  83. " allways show tagbar
  84. "autocmd VimEnter * nested :call tagbar#autoopen(1)
  85. "let g:tagbar_autoclose = 0
  86. " activate mouse support
  87. set mouse=a