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