vimrc 3.4 KB

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