vimrc 3.0 KB

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