Advertisement
Mirimax

.vimrc

Mar 4th, 2022 (edited)
1,445
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 1.33 KB | None | 0 0
  1. set noerrorbells
  2. set tabstop=2 softtabstop=2
  3. set shiftwidth=2
  4. set expandtab
  5. set smartindent
  6. set nu
  7. set nowrap
  8. set smartcase
  9. set noswapfile
  10. set nobackup
  11. set undodir=~/.vim/undodir
  12. set undofile
  13. set incsearch
  14. set relativenumber
  15. set splitbelow
  16. set nocompatible
  17. "set colorcolumn=80
  18. highlight ColorColumn ctermbg=0 guibg=lightgrey
  19.  
  20. call plug#begin('~/.vim/plugged')
  21. Plug 'morhetz/gruvbox'
  22. Plug 'preservim/nerdtree'
  23. Plug 'Xuyuanp/nerdtree-git-plugin'
  24. Plug 'tpope/vim-fugitive'
  25. Plug 'vim-scripts/DoxygenToolkit.vim'
  26. Plug 'vim-scripts/taglist.vim'
  27. Plug 'sheerun/vim-polyglot'
  28. Plug 'xolox/vim-session'
  29. Plug 'xolox/vim-misc'
  30. Plug 'fedorov7/vim-uefi'
  31. Plug 'romainl/Apprentice'
  32. call plug#end()
  33.  
  34. colorscheme gruvbox
  35. "colorscheme apprentice
  36.  
  37. set bg=dark
  38. let mapleader=" "
  39. "Trailing whitespaces
  40. highlight ExtraWhitespace ctermbg=red guibg=red
  41. match ExtraWhitespace /\s\+$/
  42. au BufWinEnter * match ExtraWhitespace /\s\+$/
  43. au InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
  44. au InsertLeave * match ExtraWhitespace /\s\+$/
  45. au BufWinLeave * call clearmatches()
  46.  
  47. "NERDTree keymaps
  48. nnoremap <leader>t :NERDTreeToggle<CR>
  49.  
  50. "Remove all trailing whitespace by pressing F5
  51. nnoremap <F5> :let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar><CR>
  52.  
  53. "Paste in visual mode without overwriting yank buffer
  54. vnoremap p "_dP
  55. let g:session_autosave='no'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement