nvimrc 3.9 KB

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