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