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 |
|
45 | set tabstop=4 |
46 | set shiftwidth=4 |
47 | set smarttab |
48 | set expandtab |
49 |
|
50 |
|
51 | " Enable Plug plugins |
52 | call plug#begin('~/.vim/plugged') |
53 |
|
54 | Plug 'vim-airline/vim-airline' |
55 | Plug 'tpope/vim-fugitive' |
56 | Plug 'scrooloose/nerdtree' |
57 | Plug 'tiagofumo/vim-nerdtree-syntax-highlight' |
58 | Plug 'bling/vim-bufferline' |
59 | Plug 'airblade/vim-gitgutter' |
60 | Plug 'jiangmiao/auto-pairs' |
61 | Plug 'tpope/vim-surround' |
62 | Plug 'sheerun/vim-polyglot' |
63 | Plug 'ervandew/supertab' |
64 |
|
65 | call plug#end() |
66 |
|
67 |
|
68 | " Automatically install any Plug plugins |
69 | autocmd VimEnter * |
70 | \ if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) |
71 | \| PlugInstall --sync | q |
72 | \| qa! |
73 | \| endif |
74 |
|
75 |
|
76 | " Plugin configuration |
77 |
|
78 | " Airline |
79 | set laststatus=2 |
80 |
|
81 | " NERDTree |
82 | let NERDTreeShowHidden=1 |
83 |
|