.nvimrc 3.8 KB

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