You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.1 KiB

  1. call plug#begin(expand('~/.vim/plugged'))
  2. Plug 'scrooloose/nerdtree'
  3. map <C-n> :NERDTreeToggle<CR>
  4. let NERDTreeShowHidden=1
  5. "" Color
  6. Plug 'tomasr/molokai'
  7. Plug 'morhetz/gruvbox'
  8. Plug 'srcery-colors/srcery-vim'
  9. call plug#end()
  10. " visual
  11. syntax on
  12. set ruler
  13. set number
  14. set title
  15. set titlestring=vim-%F
  16. set t_Co=256
  17. set cursorline
  18. set background=dark " for the dark version
  19. if $COLORTERM == 'gnome-terminal'
  20. set term=gnome-256color
  21. else
  22. if $TERM == 'xterm'
  23. set term=xterm-256color
  24. endif
  25. endif
  26. " abbreviations
  27. cnoreabbrev W! w!
  28. cnoreabbrev Q! q!
  29. cnoreabbrev Qall! qall!
  30. cnoreabbrev Wq wq
  31. cnoreabbrev Wa wa
  32. cnoreabbrev wQ wq
  33. cnoreabbrev WQ wq
  34. cnoreabbrev W w
  35. cnoreabbrev Q q
  36. cnoreabbrev Qall qall
  37. "" Switching windows
  38. noremap <C-j> <C-w>j
  39. noremap <C-k> <C-w>k
  40. noremap <C-l> <C-w>l
  41. noremap <C-h> <C-w>h
  42. "" esc mapping
  43. inoremap jk <ESC>
  44. tnoremap jk <C-\><C-n>
  45. " scroll
  46. set scrolloff=5 " keep at least 5 lines above/below
  47. set sidescrolloff=5 " keep at least 5 lines left/right
  48. colorscheme gruvbox
  49. let &t_SI.="\e[6 q" "SI = INSERT mode
  50. let &t_SR.="\e[4 q" "SR = REPLACE mode
  51. let &t_EI.="\e[2 q" "EI = NORMAL mode (ELSE)