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' |
59 | Plug 'tribela/vim-transparent' |
60 | Plug 'tpope/vim-fugitive' |
61 | Plug 'scrooloose/nerdtree' |
62 | Plug 'ryanoasis/vim-devicons' "RMHEADLESS |
63 | Plug 'tiagofumo/vim-nerdtree-syntax-highlight' |
64 | Plug 'bling/vim-bufferline' |
65 | Plug 'airblade/vim-gitgutter' |
66 | Plug 'jiangmiao/auto-pairs' |
67 | Plug 'tpope/vim-surround' |
68 | Plug 'sheerun/vim-polyglot' |
69 | Plug 'ervandew/supertab' |
70 |
|
71 | call plug#end() |
72 |
|
73 |
|
74 | " Automatically install any Plug plugins |
75 | autocmd VimEnter * |
76 | \ if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) |
77 | \| PlugInstall --sync | q |
78 | \| qa! |
79 | \| endif |
80 |
|
81 |
|
82 | " Plugin configuration |
83 |
|
84 | " Theme |
85 | if (has("termguicolors")) "RMHEADLESS |
86 | set termguicolors "RMHEADLESS |
87 | endif "RMHEADLESS |
88 | colorscheme OceanicNext |
89 |
|
90 | " Airline |
91 | set laststatus=2 |
92 | let g:airline_powerline_fonts=1 "RMHEADLESS |
93 | let g:airline_theme='oceanicnext' |
94 |
|
95 | " NERDTree |
96 | let NERDTreeShowHidden=1 |
97 |
|