vimrc 3.3 KB

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