vimrc 2.8 KB

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