vimrc 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. execute pathogen#infect()
  2. "set right encoding
  3. set encoding=utf-8
  4. set fileencoding=utf-8
  5. "use jk for Escape
  6. inoremap jk <ESC>
  7. map j gj
  8. map k gk
  9. "lajdflasldflsajflasdlfjslajfsjremap mapleader / to , this vim stuff ist really not thaaaat comfortable if
  10. "you are not used to it O.o
  11. let mapleader = ","
  12. "execute current file
  13. nnoremap <leader>e :!%:p<Enter>
  14. "open Nerdtree with CTRL+n
  15. map <C-n> :NERDTreeToggle<CR>
  16. "open Tagbar with CTRL+m
  17. map <C-m> :TagbarToggle<CR>
  18. " trigger snipmate
  19. imap kj <Plug>snipMateNextOrTrigger
  20. "configure for guivim if its active
  21. if has("gui_macvim")
  22. set guifont=Meslo\ LG\ S\ for\ Powerline:h13
  23. endif
  24. "Set auto inline on
  25. set ai
  26. "Show line numbers
  27. set number
  28. "Set syntax highlighting on
  29. syntax on
  30. " Spaces instead of Tabs
  31. " Use 4 Spaces as default and 2 Spaces for cpp files
  32. if expand("%:e")=="cpp"
  33. set tabstop=2
  34. set shiftwidth=2
  35. else
  36. set tabstop=4
  37. set shiftwidth=4
  38. endif
  39. set expandtab
  40. filetype off "Required for vundle
  41. set rtp+=~/.vim/bundle/vundle/
  42. call vundle#rc()
  43. " Let Vundle manage Vundle (required)
  44. Bundle 'gmarik/vundle'
  45. " Own bundles
  46. " Only use YCM if macvim is available. YCM is incompatible with vim version <
  47. " 7.3...
  48. "if has("gui_macvim")
  49. " Bundle 'Valloric/YouCompleteMe'
  50. "endif
  51. Bundle 'tpope/vim-pathogen'
  52. Bundle 'davidhalter/jedi-vim'
  53. "Bundle 'klen/python-mode'
  54. Bundle 'majutsushi/tagbar'
  55. Bundle 'scrooloose/nerdtree'
  56. "Bundle 'lervag/vim-latex'
  57. Bundle 'tpope/vim-fugitive'
  58. Bundle 'airblade/vim-gitgutter'
  59. " Define runtime-path (rtp) if there is no explicit repo for vim
  60. Bundle 'chriskempson/tomorrow-theme', {'rtp': 'vim/'}
  61. Bundle 'altercation/vim-colors-solarized'
  62. Bundle 'bling/vim-airline'
  63. " all three following plugins are needed for vim-snipmate
  64. Bundle "MarcWeber/vim-addon-mw-utils"
  65. Bundle "tomtom/tlib_vim"
  66. Bundle "garbas/vim-snipmate"
  67. filetype plugin indent on " required for vundle
  68. "Tomorrow color scheme
  69. colo Tomorrow-Night-Eighties
  70. "if has("gui_macvim")
  71. " set transparency=10
  72. "endif
  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:pymode_rope = 0
  79. " only use ycm for python code
  80. let g:ycm_filetype_whitelist = {'cpp': 1}
  81. " set ycm_extra_conf
  82. let g:ycm_global_ycm_extra_conf = '~/.ycm_extra_conf.py'
  83. " turn off the ycm diagnostic because of struggling with root
  84. "let g:ycm_show_diagnostics_ui = 0
  85. " NERDTree Configuration
  86. " hide some fileextenxions
  87. let NERDTreeIgnore = ['\.pyc$']
  88. " Airline stuff
  89. set laststatus=2
  90. let g:airline_powerline_fonts = 1
  91. let g:airline#extensions#tabline#enabled = 1
  92. let g:airline#extensions#tabline#buffer_nr_show = 1
  93. " allways show tagbar
  94. "autocmd VimEnter * nested :call tagbar#autoopen(1)
  95. "let g:tagbar_autoclose = 0
  96. " activate mouse support
  97. set mouse=a