1
0

nvimrc 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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 'junegunn/goyo.vim'
  24. Plug 'junegunn/limelight.vim'
  25. Plug 'lervag/vimtex'
  26. " Plug 'gilligan/vim-lldb'
  27. Plug 'atelierbram/vim-colors_atelier-schemes'
  28. Plug 'baeuml/summerfruit256.vim'
  29. Plug 'altercation/vim-colors-solarized'
  30. " All of your Plugins must be added before the following line
  31. call plug#end() " required
  32. " U S E R S E T U P
  33. "set right encoding
  34. set encoding=utf-8
  35. set fileencoding=utf-8
  36. " jump between split lines
  37. map j gj
  38. map k gk
  39. "map mapleader / to (german layout)
  40. let mapleader = ","
  41. "execute current file
  42. nnoremap <leader>e :!'%:p'<Enter>
  43. "make
  44. nnoremap <leader>m :!make<Enter>
  45. "open Nerdtree with CTRL+n
  46. map <C-n> :NERDTreeToggle<CR>
  47. "open Tagbar with CTRL+m
  48. map <C-m> :TagbarToggle<CR>
  49. " :w for :W
  50. command W w
  51. command Wq wq
  52. command Q q
  53. command Qa qa
  54. command WQ wq
  55. "configure for guivim if its active
  56. if has("gui_macvim")
  57. set guifont=Meslo\ LG\ M\ DZ\ for\ Powerline:h12
  58. endif
  59. set ai "Set auto inline on
  60. set number "Show line numbers
  61. syntax on "Set syntax highlighting on
  62. set tabstop=4 " width of tab
  63. set softtabstop=4 "should be redundant after tabstop and expandtab, but vim-snipmate is messing up (?)
  64. set shiftwidth=4
  65. set expandtab " use 'tabstop' spaces instead of tab
  66. set colorcolumn=80 " Bar hinting for 80 chars
  67. set breakindent "baby, yeah!
  68. set mouse=a " activate mouse support
  69. set backspace=indent,eol,start "this is the backspace you want!
  70. " handling backupfiles
  71. set backupdir=~/.nvim/backup//
  72. set directory=~/.nvim/swap//
  73. set undodir=~/.nvim/undo//
  74. "Tomorrow color scheme
  75. colo Tomorrow-Night-Eighties
  76. hi clear SpellBad
  77. hi SpellBad cterm=undercurl ctermbg=none ctermfg=lightyellow
  78. " YCM Configuration
  79. " dont use python-mode autocomplete obsolete now, because of YCM
  80. let g:ycm_filetype_whitelist = {'cpp': 1, 'py': 1, 'python': 1, 'arduino': 1}
  81. " set ycm_extra_conf
  82. let g:ycm_global_ycm_extra_conf = '~/.ycm.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. " vim-fugitive
  89. " gdiff vertical instead of horizontal
  90. set diffopt+=vertical
  91. " Airline stuff
  92. set laststatus=2
  93. let g:airline_powerline_fonts = 1
  94. let g:airline#extensions#tabline#enabled = 1
  95. let g:airline#extensions#tabline#buffer_nr_show = 1
  96. " multiple-cursors mapping
  97. let g:multi_cursor_use_default_mapping=0
  98. let g:multi_cursor_next_key='<C-d>'
  99. let g:multi_cursor_prev_key='<C-p>'
  100. let g:multi_cursor_skip_key='<C-x>'
  101. let g:multi_cursor_quit_key='<Esc>'
  102. " configure UltiSnips
  103. let g:UltiSnipsExpandTrigger='<C-j>'
  104. let g:UltiSnipsJumpForwardTrigger='<C-j>'
  105. let g:UltiSnipsJumpBackwardTrigger='<C-k>'
  106. " vCoolor config
  107. let g:vcoolor_map = '<C-c>'
  108. let g:vcool_ins_rgb_map = '' " Insert rgb color.
  109. let g:vcool_ins_hsl_map = '' " Insert hsl color.
  110. let g:vcool_ins_rgba_map = '' " Insert rgba color.
  111. " configure flake8
  112. " autorun flake on save
  113. autocmd BufWritePost *.py call Flake8()
  114. " instant markdown
  115. let g:instant_markdown_autostart = 0
  116. " vebugger
  117. let g:vebugger_leader = "."
  118. " activate mouse support
  119. set mouse=a
  120. set scrolloff=5
  121. " add some cpp-keywords
  122. syn keyword cppExceptions noexcept
  123. " allow mouse clicks to change cursor position
  124. set noequalalways
  125. " list whitespaces and some other characters
  126. set listchars=tab:>-,trail:~
  127. set list
  128. let g:tex_flavour="latex"