nvimrc 3.6 KB

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