vimrc 3.1 KB

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