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=6 |
44 | highlight LineNr term=bold ctermfg=grey |
45 |
|
46 | set tabstop=4 |
47 | set shiftwidth=4 |
48 | set smarttab |
49 |
|
50 | highlight VertSplit ctermbg=NONE ctermfg=NONE term=NONE cterm=NONE gui=NONE |
51 |
|
52 |
|
53 | " Enable Plug plugins |
54 | call plug#begin('~/.vim/plugged') |
55 |
|
56 | Plug 'vim-airline/vim-airline' |
57 | Plug 'mhartington/oceanic-next' |
58 | Plug 'tpope/vim-fugitive' |
59 | Plug 'scrooloose/nerdtree' |
60 | Plug 'ryanoasis/vim-devicons' |
61 | Plug 'tiagofumo/vim-nerdtree-syntax-highlight' |
62 | Plug 'bling/vim-bufferline' |
63 |
|
64 | call plug#end() |
65 |
|
66 |
|
67 | " Automatically install any Plug plugins |
68 | autocmd VimEnter * |
69 | \ if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) |
70 | \| PlugInstall --sync | q |
71 | \| qa! |
72 | \| endif |
73 |
|
74 |
|
75 | " Plugin configuration |
76 |
|
77 | " Theme |
78 | if (has("termguicolors")) |
79 | set termguicolors |
80 | endif |
81 | colorscheme OceanicNext |
82 |
|
83 | " Airline |
84 | set laststatus=2 |
85 | let g:airline_powerline_fonts=1 |
86 | let g:airline_theme='oceanicnext' |
87 |
|
88 | " NERDTree |
89 | let NERDTreeShowHidden=1 |
90 |
|