1 | set nocompatible |
2 | set t_RB= |
3 | set t_RF= |
4 | set t_u7= |
5 |
|
6 | au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") |
7 | \| exe "normal! g'\"" | endif |
8 |
|
9 | " Formatting configuration |
10 | filetype plugin indent on |
11 | set spelllang=en_us |
12 | set encoding=utf-8 |
13 |
|
14 | " Keyboard mapping |
15 | let mapleader=" " |
16 | set clipboard=unnamedplus |
17 |
|
18 | inoremap jk <ESC> |
19 | noremap <leader>w ^ |
20 | noremap <leader>e $ |
21 | noremap <leader>f <c-w> |
22 | noremap <c-n> :tabnew<CR> |
23 | noremap <leader><CR>1 1gt |
24 | noremap <leader><CR>2 2gt |
25 | noremap <leader><CR>3 3gt |
26 | noremap <leader><CR>4 4gt |
27 | noremap <leader><CR>5 5gt |
28 | noremap <leader><CR>6 6gt |
29 | noremap <leader><CR>7 7gt |
30 | noremap <leader><CR>8 8gt |
31 | noremap <leader><CR>9 9gt |
32 | noremap <leader>t :ter<CR> |
33 | noremap <leader>r :so $MYVIMRC<CR> |
34 | noremap <leader>1 :b1<CR> |
35 | noremap <leader>2 :b2<CR> |
36 | noremap <leader>3 :b3<CR> |
37 | noremap <leader>4 :b4<CR> |
38 | noremap <leader>5 :b5<CR> |
39 | noremap <leader>6 :b6<CR> |
40 | noremap <leader>7 :b7<CR> |
41 | noremap <leader>8 :b8<CR> |
42 | noremap <leader>9 :b9<CR> |
43 |
|
44 | map <leader>n :NERDTreeToggle<CR> |
45 |
|
46 | " Vim style configuration |
47 | syntax on |
48 |
|
49 | set scrolloff=12 |
50 | set showcmd |
51 | set showmatch |
52 |
|
53 | set number |
54 | set numberwidth=4 |
55 |
|
56 | set tabstop=4 |
57 | set shiftwidth=4 |
58 | set smarttab |
59 | set expandtab |
60 |
|
61 | " Enable Plug plugins |
62 | call plug#begin(expand('<sfile>:p:h') . '/plugged') |
63 |
|
64 | Plug 'vim-airline/vim-airline' |
65 | Plug 'vim-airline/vim-airline-themes' |
66 | Plug 'sainnhe/sonokai' |
67 | Plug 'tribela/vim-transparent' |
68 | Plug 'tpope/vim-fugitive' |
69 | Plug 'scrooloose/nerdtree' |
70 | Plug 'ryanoasis/vim-devicons' "RMHEADLESS |
71 | Plug 'tiagofumo/vim-nerdtree-syntax-highlight' |
72 | Plug 'bling/vim-bufferline' |
73 | Plug 'airblade/vim-gitgutter' |
74 | Plug 'jiangmiao/auto-pairs' |
75 | Plug 'tpope/vim-surround' |
76 | Plug 'sheerun/vim-polyglot' |
77 | Plug 'meatballs/vim-xonsh' |
78 | Plug 'valloric/matchtagalways' |
79 | Plug 'godlygeek/tabular' |
80 |
|
81 | call plug#end() |
82 |
|
83 |
|
84 | " Automatically install any Plug plugins |
85 | autocmd VimEnter * |
86 | \ if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) |
87 | \| PlugInstall --sync |
88 | \| q |
89 | \| qa! |
90 | \| endif |
91 |
|
92 |
|
93 | if (has("termguicolors")) |
94 | set termguicolors |
95 | endif |
96 |
|
97 | autocmd ColorScheme * highlight! link SignColumn LineNr |
98 | autocmd ColorScheme * highlight Normal ctermbg=NONE guibg=NONE |
99 | autocmd ColorScheme * highlight NonText ctermbg=NONE guibg=NONE |
100 | autocmd ColorScheme * highlight VertSplit cterm=NONE ctermbg=NONE guibg=NONE |
101 | autocmd ColorScheme * highlight LineNr ctermbg=NONE guibg=NONE |
102 |
|
103 | let g:sonokai_style = 'atlantis' |
104 | let g:sonokai_better_performance = 1 |
105 |
|
106 | colorscheme sonokai |
107 |
|
108 | " Airline |
109 | set laststatus=2 |
110 | let g:airline_powerline_fonts=1 "RMHEADLESS |
111 | let g:airline_theme='sonokai' |
112 |
|
113 | " Git Gutter |
114 | let g:gitgutter_set_sign_backgrounds=1 |
115 | set updatetime=250 |
116 |
|
117 | " NERDTree |
118 | let NERDTreeShowHidden=1 |
119 | let NERDTreeChDirMode=3 |
120 |
|