1
0

nvimrc 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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 'vim-airline/vim-airline'
  14. Plug 'vim-airline/vim-airline-themes'
  15. Plug 'terryma/vim-multiple-cursors'
  16. Plug 'suan/vim-instant-markdown'
  17. Plug 'tpope/vim-markdown'
  18. Plug 'KabbAmine/vCoolor.vim'
  19. Plug 'nvie/vim-flake8'
  20. Plug 'Raimondi/delimitMate'
  21. Plug 'SirVer/ultisnips'
  22. Plug 'rizzatti/dash.vim'
  23. Plug 'octol/vim-cpp-enhanced-highlight'
  24. Plug 'junegunn/goyo.vim'
  25. Plug 'junegunn/limelight.vim'
  26. Plug 'lervag/vimtex'
  27. Plug 'ap/vim-css-color'
  28. " Plug 'gilligan/vim-lldb'
  29. Plug 'atelierbram/vim-colors_atelier-schemes'
  30. Plug 'baeuml/summerfruit256.vim'
  31. Plug 'altercation/vim-colors-solarized'
  32. " All of your Plugins must be added before the following line
  33. call plug#end() " required
  34. "
  35. " U S E R S E T U P
  36. "
  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. " Run `make` in current directory
  45. nnoremap <leader>m :!make<Enter>
  46. " open Nerdtree with CTRL+n
  47. map <C-n> :NERDTreeToggle<CR>
  48. " open Tagbar with CTRL+m
  49. map <C-m> :TagbarToggle<CR>
  50. " :w for :W
  51. command W w
  52. command Wq wq
  53. command Q q
  54. command Qa qa
  55. command WQ wq
  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. " should be redundant after tabstop and expandtab,
  61. " but vim-snipmate is messing up (?)
  62. set softtabstop=4
  63. set shiftwidth=4
  64. set expandtab " use 'tabstop' spaces instead of tab
  65. set colorcolumn=80 " Bar hinting for 80 chars
  66. set breakindent " baby, yeah!
  67. set mouse=a " activate mouse support
  68. " handling backupfiles
  69. set backupdir=~/.nvim/backup//
  70. set directory=~/.nvim/swap//
  71. set undodir=~/.nvim/undo//
  72. "Tomorrow color scheme
  73. colo Tomorrow-Night-Eighties
  74. hi clear SpellBad
  75. hi SpellBad cterm=undercurl ctermbg=none ctermfg=lightyellow
  76. " YCM Configuration
  77. " dont use python-mode autocomplete obsolete now, because of YCM
  78. let g:ycm_filetype_whitelist = {'cpp': 1, 'py': 1, 'python': 1, 'arduino': 1}
  79. " set ycm_extra_conf
  80. let g:ycm_global_ycm_extra_conf = '~/.ycm.py'
  81. " turn off the ycm diagnostic because of struggling with root
  82. "let g:ycm_show_diagnostics_ui = 0
  83. " NERDTree Configuration
  84. " hide some fileextenxions
  85. let NERDTreeIgnore = ['\.pyc$']
  86. " vim-fugitive
  87. " gdiff vertical instead of horizontal
  88. set diffopt+=vertical
  89. " Airline stuff
  90. set laststatus=2
  91. let g:airline_powerline_fonts = 1
  92. let g:airline#extensions#tabline#enabled = 1
  93. let g:airline#extensions#tabline#buffer_nr_show = 1
  94. " multiple-cursors mapping
  95. let g:multi_cursor_use_default_mapping=0
  96. let g:multi_cursor_next_key='<C-d>'
  97. let g:multi_cursor_prev_key='<C-p>'
  98. let g:multi_cursor_skip_key='<C-x>'
  99. let g:multi_cursor_quit_key='<Esc>'
  100. " configure UltiSnips
  101. let g:UltiSnipsExpandTrigger='<C-j>'
  102. let g:UltiSnipsJumpForwardTrigger='<C-j>'
  103. let g:UltiSnipsJumpBackwardTrigger='<C-k>'
  104. " vCoolor config
  105. let g:vcoolor_map = '<C-c>'
  106. let g:vcool_ins_rgb_map = '' " Insert rgb color.
  107. let g:vcool_ins_hsl_map = '' " Insert hsl color.
  108. let g:vcool_ins_rgba_map = '' " Insert rgba color.
  109. " configure flake8
  110. " bind `,f` to Flake8
  111. nnoremap <leader>f :call Flake8()<CR>
  112. " instant markdown
  113. let g:instant_markdown_autostart = 0
  114. " activate mouse support
  115. set mouse=a
  116. set scrolloff=5
  117. " add some cpp-keywords
  118. syn keyword cppExceptions noexcept
  119. " allow mouse clicks to change cursor position
  120. set noequalalways
  121. " list whitespaces and some other characters
  122. set listchars=tab:>-,trail:~
  123. set list
  124. " use latex flavour for plaintex files
  125. let g:tex_flavour="latex"