1
0

vimrc 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. call plug#begin('~/.vim/plugged')
  2. " let Vundle manage Vundle, required
  3. Plug 'Shougo/neocomplete.vim'
  4. Plug 'osyo-manga/vim-marching'
  5. Plug 'Shougo/vimproc.vim'
  6. Plug 'osyo-manga/vim-reunions'
  7. Plug 'majutsushi/tagbar'
  8. Plug 'scrooloose/nerdtree'
  9. Plug 'tpope/vim-fugitive'
  10. Plug 'rust-lang/rust.vim'
  11. Plug 'airblade/vim-gitgutter'
  12. Plug 'mhinz/vim-startify'
  13. " Dene runtime-path (rtp) if there is no explicit repo for vim
  14. Plug 'chriskempson/tomorrow-theme', {'rtp': 'vim/'}
  15. Plug 'altercation/vim-colors-solarized'
  16. Plug 'bling/vim-airline'
  17. Plug 'terryma/vim-multiple-cursors'
  18. Plug 'suan/vim-instant-markdown'
  19. Plug 'tpope/vim-markdown'
  20. Plug 'KabbAmine/vCoolor.vim'
  21. Plug 'nvie/vim-flake8'
  22. Plug 'Raimondi/delimitMate'
  23. Plug 'SirVer/ultisnips'
  24. Plug 'rizzatti/dash.vim'
  25. Plug 'octol/vim-cpp-enhanced-highlight'
  26. " Plugin 'gilligan/vim-lldb'
  27. " All of your Plugins must be added before the following line
  28. call plug#end() " required
  29. " U S E R S E T U P
  30. "set right encoding
  31. set encoding=utf-8
  32. set fileencoding=utf-8
  33. " jump between split lines
  34. map j gj
  35. map k gk
  36. "map mapleader / to (german layout)
  37. let mapleader = ","
  38. "execute current file
  39. nnoremap <leader>e :!'%:p'<Enter>
  40. "make
  41. nnoremap <leader>m :!make<Enter>
  42. "open Nerdtree with CTRL+n
  43. map <C-n> :NERDTreeToggle<CR>
  44. "open Tagbar with CTRL+m
  45. map <C-m> :TagbarToggle<CR>
  46. " :w for :W
  47. command W w
  48. command Wq wq
  49. command Q q
  50. command WQ wq
  51. "configure for guivim if its active
  52. if has("gui_macvim")
  53. set guifont=Meslo\ LG\ M\ DZ\ for\ Powerline:h12
  54. endif
  55. set ai "Set auto inline on
  56. set number "Show line numbers
  57. syntax on "Set syntax highlighting on
  58. set tabstop=4 " width of tab
  59. set softtabstop=4 "should be redundant after tabstop and expandtab, but vim-snipmate is messing up (?)
  60. set shiftwidth=4
  61. set expandtab " use 'tabstop' spaces instead of tab
  62. set colorcolumn=80 " Bar hinting for 80 chars
  63. set breakindent "baby, yeah!
  64. set mouse=a " activate mouse support
  65. set backspace=indent,eol,start "this is the backspace you want!
  66. " handling backupfiles
  67. set backupdir=~/.vim/backup//
  68. set directory=~/.vim/swap//
  69. set undodir=~/.vim/undo//
  70. "Tomorrow color scheme
  71. colo Tomorrow-Night-Eighties
  72. " NeoComplete Setup
  73. let g:neocomplete#enable_at_startup = 1
  74. " use smartcase
  75. let g:neocomplete#enable_smart_case = 1
  76. " vim-marching setup
  77. let g:marching_include_paths = [
  78. \ "/Users/bixel/binaries/root/include/root"
  79. \]
  80. let g:marching_clang_command = "/usr/bin/clang"
  81. " cooperate with neocomplete.vim
  82. let g:marching_enable_neocomplete = 1
  83. if !exists('g:neocomplete#force_omni_input_patterns')
  84. let g:neocomplete#force_omni_input_patterns = {}
  85. endif
  86. " for c and c++
  87. let g:neocomplete#force_omni_input_patterns.c = '[^.[:digit:] *\t]\%(\.\|->\)\w*'
  88. let g:neocomplete#force_omni_input_patterns.cpp = '[^.[:digit:] *\t]\%(\.\|->\)\w*\|\h\w*::\w*'
  89. " NERDTree Configuration
  90. " hide some fileextenxions
  91. let NERDTreeIgnore = ['\.pyc$']
  92. " vim-fugitive
  93. " gdiff vertical instead of horizontal
  94. set diffopt+=vertical
  95. " Airline stuff
  96. set laststatus=2
  97. let g:airline_powerline_fonts = 1
  98. let g:airline#extensions#tabline#enabled = 1
  99. let g:airline#extensions#tabline#buffer_nr_show = 1
  100. " multiple-cursors mapping
  101. let g:multi_cursor_use_default_mapping=0
  102. let g:multi_cursor_next_key='<C-d>'
  103. let g:multi_cursor_prev_key='<C-p>'
  104. let g:multi_cursor_skip_key='<C-x>'
  105. let g:multi_cursor_quit_key='<Esc>'
  106. " configure UltiSnips
  107. let g:UltiSnipsExpandTrigger='<C-j>'
  108. let g:UltiSnipsJumpForwardTrigger='<C-j>'
  109. let g:UltiSnipsJumpBackwardTrigger='<C-k>'
  110. " vCoolor config
  111. let g:vcoolor_map = '<C-c>'
  112. let g:vcool_ins_rgb_map = '' " Insert rgb color.
  113. let g:vcool_ins_hsl_map = '' " Insert hsl color.
  114. let g:vcool_ins_rgba_map = '' " Insert rgba color.
  115. " configure flake8
  116. " autorun flake on save
  117. autocmd BufWritePost *.py call Flake8()
  118. " instant markdown
  119. let g:instant_markdown_autostart = 0
  120. " vebugger
  121. let g:vebugger_leader = "."
  122. " activate mouse support
  123. set mouse=a
  124. set scrolloff=5
  125. syn keyword cppExceptions noexcept
  126. set noequalalways