vimrc 2.8 KB

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