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 :b1<CR> |
24 | noremap <leader><CR>2 :b2<CR> |
25 | noremap <leader><CR>3 :b3<CR> |
26 | noremap <leader><CR>4 :b4<CR> |
27 | noremap <leader><CR>5 :b5<CR> |
28 | noremap <leader><CR>6 :b6<CR> |
29 | noremap <leader><CR>7 :b7<CR> |
30 | noremap <leader><CR>8 :b8<CR> |
31 | noremap <leader><CR>9 :b9<CR> |
32 | noremap <leader>1 1gt |
33 | noremap <leader>2 2gt |
34 | noremap <leader>3 3gt |
35 | noremap <leader>4 4gt |
36 | noremap <leader>5 5gt |
37 | noremap <leader>6 6gt |
38 | noremap <leader>7 7gt |
39 | noremap <leader>8 8gt |
40 | noremap <leader>9 9gt |
41 |
|
42 | map <leader>n :NERDTreeToggle<CR> |
43 |
|
44 | " Vim style configuration |
45 | syntax on |
46 |
|
47 | set showcmd |
48 | set showmatch |
49 |
|
50 | set number |
51 | set numberwidth=4 |
52 |
|
53 | set tabstop=4 |
54 | set shiftwidth=4 |
55 | set smarttab |
56 | set expandtab |
57 |
|
58 | " Enable Plug plugins |
59 | call plug#begin(expand('<sfile>:p:h') . '/plugged') |
60 |
|
61 | Plug 'vim-airline/vim-airline' |
62 | Plug 'mhartington/oceanic-next' |
63 | Plug 'tribela/vim-transparent' |
64 | Plug 'tpope/vim-fugitive' |
65 | Plug 'scrooloose/nerdtree' |
66 | Plug 'ryanoasis/vim-devicons' "RMHEADLESS |
67 | Plug 'tiagofumo/vim-nerdtree-syntax-highlight' |
68 | Plug 'bling/vim-bufferline' |
69 | Plug 'airblade/vim-gitgutter' |
70 | Plug 'jiangmiao/auto-pairs' |
71 | Plug 'tpope/vim-surround' |
72 | Plug 'sheerun/vim-polyglot' |
73 | Plug 'ervandew/supertab' |
74 |
|
75 | call plug#end() |
76 |
|
77 |
|
78 | " Automatically install any Plug plugins |
79 | autocmd VimEnter * |
80 | \ if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) |
81 | \| PlugInstall --sync |
82 | \| q |
83 | \| qa! |
84 | \| endif |
85 |
|
86 |
|
87 | if (has("termguicolors")) |
88 | set termguicolors |
89 | endif |
90 |
|
91 | autocmd ColorScheme * highlight! link SignColumn LineNr |
92 | autocmd ColorScheme * highlight Normal ctermbg=NONE guibg=NONE |
93 | autocmd ColorScheme * highlight NonText ctermbg=NONE guibg=NONE |
94 | autocmd ColorScheme * highlight VertSplit cterm=NONE ctermbg=NONE guibg=NONE |
95 | autocmd ColorScheme * highlight LineNr ctermbg=NONE guibg=NONE |
96 |
|
97 | colorscheme OceanicNext |
98 |
|
99 |
|
100 | " Airline |
101 | set laststatus=2 |
102 | let g:airline_powerline_fonts=1 "RMHEADLESS |
103 | let g:airline_theme='oceanicnext' |
104 |
|
105 | " Git Gutter |
106 | let g:gitgutter_set_sign_backgrounds=1 |
107 | set updatetime=250 |
108 |
|
109 | " NERDTree |
110 | let NERDTreeShowHidden=1 |
111 |
|