1 | set nocompatible |
2 |
|
3 | " Formatting configuration |
4 | filetype plugin indent on |
5 | set spelllang=en_us |
6 | set encoding=utf-8 |
7 |
|
8 | " Keyboard mapping |
9 | let mapleader=" " |
10 | set clipboard=unnamedplus |
11 |
|
12 | inoremap jk <ESC> |
13 | noremap <leader>w ^ |
14 | noremap <leader>e $ |
15 | noremap <leader>f <c-w> |
16 | noremap <c-n> :tabnew<CR> |
17 | noremap <leader><CR>1 :b1<CR> |
18 | noremap <leader><CR>2 :b2<CR> |
19 | noremap <leader><CR>3 :b3<CR> |
20 | noremap <leader><CR>4 :b4<CR> |
21 | noremap <leader><CR>5 :b5<CR> |
22 | noremap <leader><CR>6 :b6<CR> |
23 | noremap <leader><CR>7 :b7<CR> |
24 | noremap <leader><CR>8 :b8<CR> |
25 | noremap <leader><CR>9 :b9<CR> |
26 | noremap <leader>1 1gt |
27 | noremap <leader>2 2gt |
28 | noremap <leader>3 3gt |
29 | noremap <leader>4 4gt |
30 | noremap <leader>5 5gt |
31 | noremap <leader>6 6gt |
32 | noremap <leader>7 7gt |
33 | noremap <leader>8 8gt |
34 | noremap <leader>9 9gt |
35 |
|
36 | map <leader>n :NERDTreeToggle<CR> |
37 |
|
38 | " Vim style configuration |
39 | syntax enable |
40 |
|
41 | set showcmd |
42 | set showmatch |
43 |
|
44 | set number |
45 | set numberwidth=4 |
46 |
|
47 | set tabstop=4 |
48 | set shiftwidth=4 |
49 | set smarttab |
50 | set expandtab |
51 |
|
52 | " Enable Plug plugins |
53 | call plug#begin(expand('<sfile>:p:h') . '/plugged') |
54 |
|
55 | Plug 'vim-airline/vim-airline' |
56 | Plug 'mhartington/oceanic-next' |
57 | Plug 'tpope/vim-fugitive' |
58 | Plug 'scrooloose/nerdtree' |
59 | Plug 'ryanoasis/vim-devicons' "RMHEADLESS |
60 | Plug 'tiagofumo/vim-nerdtree-syntax-highlight' |
61 | Plug 'bling/vim-bufferline' |
62 | Plug 'airblade/vim-gitgutter' |
63 | Plug 'jiangmiao/auto-pairs' |
64 | Plug 'tpope/vim-surround' |
65 | Plug 'sheerun/vim-polyglot' |
66 | Plug 'ervandew/supertab' |
67 |
|
68 | call plug#end() |
69 |
|
70 |
|
71 | " Automatically install any Plug plugins |
72 | autocmd VimEnter * |
73 | \ if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) |
74 | \| PlugInstall --sync |
75 | \| q |
76 | \| qa! |
77 | \| endif |
78 |
|
79 |
|
80 | " Plugin configuration |
81 |
|
82 | " Theme |
83 | if (has("termguicolors")) |
84 | set termguicolors |
85 | endif |
86 | colorscheme OceanicNext |
87 |
|
88 | " Airline |
89 | set laststatus=2 |
90 | let g:airline_powerline_fonts=1 "RMHEADLESS |
91 | let g:airline_theme='oceanicnext' |
92 |
|
93 | highlight Normal ctermbg=NONE ctermfg=NONE term=NONE cterm=NONE gui=NONE |
94 |
|
95 |
|
96 | " NERDTree |
97 | let NERDTreeShowHidden=1 |
98 |
|