1
0

nvimrc 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. " set the runtime path to include Vundle and initialize
  2. call plug#begin('~/.config/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 'critiqjo/lldb.nvim'
  30. Plug 'atelierbram/vim-colors_atelier-schemes'
  31. Plug 'baeuml/summerfruit256.vim'
  32. Plug 'altercation/vim-colors-solarized'
  33. Plug 'mattn/emmet-vim'
  34. " All of your Plugins must be added before the following line
  35. call plug#end() " required
  36. "
  37. " U S E R S E T U P
  38. "
  39. " jump between split lines
  40. map j gj
  41. map k gk
  42. "map mapleader / to (german layout)
  43. let mapleader = ","
  44. " execute current file
  45. nnoremap <leader>e :!'%:p'<Enter>
  46. " Run `make` in current directory
  47. nnoremap <leader>m :!make<Enter>
  48. " open Nerdtree with CTRL+n
  49. map <C-n> :NERDTreeToggle<CR>
  50. " open Tagbar with CTRL+m
  51. map <C-m> :TagbarToggle<CR>
  52. " :w for :W
  53. command W w
  54. command Wq wq
  55. command Q q
  56. command Qa qa
  57. command WQ wq
  58. set ai " Set auto inline on
  59. set number " Show line numbers
  60. syntax on " Set syntax highlighting on
  61. set tabstop=4 " width of tab
  62. " should be redundant after tabstop and expandtab,
  63. " but vim-snipmate is messing up (?)
  64. set softtabstop=4
  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 ignorecase " ignore case while searching
  71. " handling backupfiles
  72. set backupdir=~/.config/nvim/backup//
  73. set directory=~/.config/nvim/swap//
  74. set undodir=~/.config/nvim/undo//
  75. "Tomorrow color scheme
  76. colo Tomorrow-Night-Eighties
  77. hi clear SpellBad
  78. hi SpellBad cterm=undercurl ctermbg=none ctermfg=lightyellow
  79. " YCM Configuration
  80. " dont use python-mode autocomplete obsolete now, because of YCM
  81. let g:ycm_filetype_whitelist = {'cpp': 1, 'py': 1, 'python': 1, 'arduino': 1}
  82. " set ycm_extra_conf
  83. let g:ycm_global_ycm_extra_conf = '~/.ycm.py'
  84. " turn off the ycm diagnostic because of struggling with root
  85. "let g:ycm_show_diagnostics_ui = 0
  86. let g:ycm_autoclose_preview_window_after_insertion = 1
  87. let g:ycm_autoclose_preview_window_after_completion = 1
  88. " NERDTree Configuration
  89. " hide some fileextenxions
  90. let NERDTreeIgnore = ['\.pyc$']
  91. " vim-fugitive
  92. " gdiff vertical instead of horizontal
  93. set diffopt+=vertical
  94. " Airline stuff
  95. set laststatus=2
  96. let g:airline_powerline_fonts = 1
  97. let g:airline#extensions#tabline#enabled = 1
  98. let g:airline#extensions#tabline#buffer_nr_show = 1
  99. " multiple-cursors mapping
  100. let g:multi_cursor_use_default_mapping=0
  101. let g:multi_cursor_next_key='<C-d>'
  102. let g:multi_cursor_prev_key='<C-p>'
  103. let g:multi_cursor_skip_key='<C-x>'
  104. let g:multi_cursor_quit_key='<Esc>'
  105. " configure UltiSnips
  106. let g:UltiSnipsExpandTrigger='<C-j>'
  107. let g:UltiSnipsJumpForwardTrigger='<C-j>'
  108. let g:UltiSnipsJumpBackwardTrigger='<C-k>'
  109. " vCoolor config
  110. let g:vcoolor_map = '<C-c>'
  111. let g:vcool_ins_rgb_map = '' " Insert rgb color.
  112. let g:vcool_ins_hsl_map = '' " Insert hsl color.
  113. let g:vcool_ins_rgba_map = '' " Insert rgba color.
  114. " Enable emmet-vim just for html/css
  115. let g:user_emmet_isntall_global = 0
  116. autocmd FileType html,css EmmetInstall
  117. " configure flake8
  118. " bind `,f` to Flake8
  119. nnoremap <leader>f :call Flake8()<CR>
  120. " instant markdown
  121. let g:instant_markdown_autostart = 0
  122. " activate mouse support
  123. set mouse=a
  124. set scrolloff=5
  125. " add some cpp-keywords
  126. syn keyword cppExceptions noexcept using
  127. " allow mouse clicks to change cursor position
  128. set noequalalways
  129. " list whitespaces and some other characters
  130. set listchars=tab:>-,trail:~
  131. set list
  132. " use latex flavour for plaintex files
  133. let g:tex_flavour="latex"