nvimrc 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. " set the runtime path to include Vundle and initialize
  2. call plug#begin('~/.nvim/plugged')
  3. Plug 'Valloric/YouCompleteMe'
  4. Plug 'majutsushi/tagbar'
  5. Plug 'scrooloose/nerdtree'
  6. Plug 'tpope/vim-fugitive'
  7. Plug 'rust-lang/rust.vim'
  8. Plug 'airblade/vim-gitgutter'
  9. Plug 'mhinz/vim-startify'
  10. " Define runtime-path (rtp) if there is no explicit repo for vim
  11. Plug 'chriskempson/tomorrow-theme', {'rtp': 'vim/'}
  12. Plug 'altercation/vim-colors-solarized'
  13. Plug 'bling/vim-airline'
  14. Plug 'terryma/vim-multiple-cursors'
  15. Plug 'suan/vim-instant-markdown'
  16. Plug 'tpope/vim-markdown'
  17. Plug 'KabbAmine/vCoolor.vim'
  18. Plug 'nvie/vim-flake8'
  19. Plug 'Raimondi/delimitMate'
  20. Plug 'SirVer/ultisnips'
  21. Plug 'rizzatti/dash.vim'
  22. Plug 'octol/vim-cpp-enhanced-highlight'
  23. " Plug 'gilligan/vim-lldb'
  24. Plug 'atelierbram/vim-colors_atelier-schemes'
  25. Plug 'baeuml/summerfruit256.vim'
  26. Plug 'altercation/vim-colors-solarized'
  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 Qa qa
  51. command WQ wq
  52. "configure for guivim if its active
  53. if has("gui_macvim")
  54. set guifont=Meslo\ LG\ M\ DZ\ for\ Powerline:h12
  55. endif
  56. set ai "Set auto inline on
  57. set number "Show line numbers
  58. syntax on "Set syntax highlighting on
  59. set tabstop=4 " width of tab
  60. set softtabstop=4 "should be redundant after tabstop and expandtab, but vim-snipmate is messing up (?)
  61. set shiftwidth=4
  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. set backspace=indent,eol,start "this is the backspace you want!
  67. " handling backupfiles
  68. set backupdir=~/.vim/backup//
  69. set directory=~/.vim/swap//
  70. set undodir=~/.vim/undo//
  71. "Tomorrow color scheme
  72. colo Tomorrow-Night-Eighties
  73. " YCM Configuration
  74. " dont use python-mode autocomplete obsolete now, because of YCM
  75. let g:ycm_filetype_whitelist = {'cpp': 1, 'py': 1, 'python': 1, 'arduino': 1}
  76. " set ycm_extra_conf
  77. let g:ycm_global_ycm_extra_conf = '~/.vim/ycm.py'
  78. " turn off the ycm diagnostic because of struggling with root
  79. "let g:ycm_show_diagnostics_ui = 0
  80. " NERDTree Configuration
  81. " hide some fileextenxions
  82. let NERDTreeIgnore = ['\.pyc$']
  83. " vim-fugitive
  84. " gdiff vertical instead of horizontal
  85. set diffopt+=vertical
  86. " Airline stuff
  87. set laststatus=2
  88. let g:airline_powerline_fonts = 1
  89. let g:airline#extensions#tabline#enabled = 1
  90. let g:airline#extensions#tabline#buffer_nr_show = 1
  91. " multiple-cursors mapping
  92. let g:multi_cursor_use_default_mapping=0
  93. let g:multi_cursor_next_key='<C-d>'
  94. let g:multi_cursor_prev_key='<C-p>'
  95. let g:multi_cursor_skip_key='<C-x>'
  96. let g:multi_cursor_quit_key='<Esc>'
  97. " configure UltiSnips
  98. let g:UltiSnipsExpandTrigger='<C-j>'
  99. let g:UltiSnipsJumpForwardTrigger='<C-j>'
  100. let g:UltiSnipsJumpBackwardTrigger='<C-k>'
  101. " vCoolor config
  102. let g:vcoolor_map = '<C-c>'
  103. let g:vcool_ins_rgb_map = '' " Insert rgb color.
  104. let g:vcool_ins_hsl_map = '' " Insert hsl color.
  105. let g:vcool_ins_rgba_map = '' " Insert rgba color.
  106. " configure flake8
  107. " autorun flake on save
  108. autocmd BufWritePost *.py call Flake8()
  109. " instant markdown
  110. let g:instant_markdown_autostart = 0
  111. " vebugger
  112. let g:vebugger_leader = "."
  113. " activate mouse support
  114. set mouse=a
  115. set scrolloff=5
  116. " add some cpp-keywords
  117. syn keyword cppExceptions noexcept
  118. " allow mouse clicks to change cursor position
  119. set noequalalways