.vimrc 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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. Plugin 'mhinz/vim-startify'
  16. " Define runtime-path (rtp) if there is no explicit repo for vim
  17. Plugin 'chriskempson/tomorrow-theme', {'rtp': 'vim/'}
  18. Plugin 'altercation/vim-colors-solarized'
  19. Plugin 'bling/vim-airline'
  20. Plugin 'terryma/vim-multiple-cursors'
  21. Plugin 'suan/vim-instant-markdown'
  22. Plugin 'tpope/vim-markdown'
  23. Plugin 'KabbAmine/vCoolor.vim'
  24. Plugin 'nvie/vim-flake8'
  25. " Plugin 'Townk/vim-autoclose'
  26. " all three following plugins are needed for vim-snipmate
  27. Bundle "MarcWeber/vim-addon-mw-utils"
  28. Bundle "tomtom/tlib_vim"
  29. Bundle "garbas/vim-snipmate"
  30. " All of your Plugins must be added before the following line
  31. call vundle#end() " required
  32. filetype plugin indent on " required
  33. " U S E R S E T U P
  34. "set right encoding
  35. set encoding=utf-8
  36. set fileencoding=utf-8
  37. " jump between split lines
  38. map j gj
  39. map k gk
  40. "map mapleader / to (german layout)
  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 <C-J> <esc>a<Plug>snipMateNextOrTrigger
  50. smap <C-J> <Plug>snipMateNextOrTrigger
  51. " :w for :W
  52. command W w
  53. command Wq w
  54. "configure for guivim if its active
  55. if has("gui_macvim")
  56. set guifont=Meslo\ LG\ M\ for\ Powerline:h13
  57. endif
  58. set ai "Set auto inline on
  59. set number "Show line numbers
  60. syntax on "Set syntax highlighting on
  61. set tabstop=4 " width of tab
  62. set expandtab " use 'tabstop' spaces instead of tab
  63. set colorcolumn=80 " Bar hinting for 80 chars
  64. set breakindent "baby, yeah!
  65. set mouse=a " activate mouse support
  66. "Tomorrow color scheme
  67. colo Tomorrow-Night-Eighties
  68. " YCM Configuration
  69. " dont use python-mode autocomplete obsolete now, because of YCM
  70. let g:ycm_filetype_whitelist = {'cpp': 1, 'py': 1, 'arduino': 1}
  71. " set ycm_extra_conf
  72. let g:ycm_global_ycm_extra_conf = '~/.vim/ycm.py'
  73. " turn off the ycm diagnostic because of struggling with root
  74. "let g:ycm_show_diagnostics_ui = 0
  75. " NERDTree Configuration
  76. " hide some fileextenxions
  77. let NERDTreeIgnore = ['\.pyc$']
  78. " Airline stuff
  79. set laststatus=2
  80. let g:airline_powerline_fonts = 1
  81. let g:airline#extensions#tabline#enabled = 1
  82. let g:airline#extensions#tabline#buffer_nr_show = 1
  83. " multiple-cursors mapping
  84. let g:multi_cursor_use_default_mapping=0
  85. let g:multi_cursor_next_key='<C-d>'
  86. let g:multi_cursor_prev_key='<C-p>'
  87. let g:multi_cursor_skip_key='<C-x>'
  88. let g:multi_cursor_quit_key='<Esc>'
  89. " configure snipmate
  90. let g:snipMate = {}
  91. let g:snipMate.scope_aliases = {}
  92. let g:snipMate.scope_aliases['latextex'] = 'tex'
  93. let g:snipMate.scope_aliases['plaintex'] = 'tex'
  94. " vCoolor config
  95. let g:vcoolor_map = '<C-c>'
  96. let g:vcool_ins_rgb_map = '' " Insert rgb color.
  97. let g:vcool_ins_hsl_map = '' " Insert hsl color.
  98. let g:vcool_ins_rgba_map = '' " Insert rgba color.
  99. " configure flake8
  100. " autorun flake on save
  101. autocmd BufWritePost *.py call Flake8()
  102. " instant markdown
  103. let g:instant_markdown_autostart = 0
  104. " activate mouse support
  105. set mouse=a