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 <leader><CR>1 :b1<CR> |
15 | noremap <leader><CR>2 :b2<CR> |
16 | noremap <leader><CR>3 :b3<CR> |
17 | noremap <leader><CR>4 :b4<CR> |
18 | noremap <leader><CR>5 :b5<CR> |
19 | noremap <leader><CR>6 :b6<CR> |
20 | noremap <leader><CR>7 :b7<CR> |
21 | noremap <leader><CR>8 :b8<CR> |
22 | noremap <leader><CR>9 :b9<CR> |
23 | noremap <leader>1 1gt |
24 | noremap <leader>2 2gt |
25 | noremap <leader>3 3gt |
26 | noremap <leader>4 4gt |
27 | noremap <leader>5 5gt |
28 | noremap <leader>6 6gt |
29 | noremap <leader>7 7gt |
30 | noremap <leader>8 8gt |
31 | noremap <leader>9 9gt |
32 |
|
33 | map <leader>n :NERDTreeToggle<CR> |
34 |
|
35 | " Vim style configuration |
36 | syntax on |
37 |
|
38 | set showcmd |
39 | set showmatch |
40 |
|
41 | set number |
42 | set numberwidth=6 |
43 | highlight LineNr term=bold ctermfg=grey |
44 |
|
45 | set tabstop=4 |
46 | set shiftwidth=4 |
47 | set smarttab |
48 |
|
49 | highlight VertSplit ctermbg=NONE ctermfg=NONE term=NONE cterm=NONE gui=NONE |
50 |
|
51 |
|
52 | " Enable Plug plugins |
53 | call plug#begin('~/.vim/plugged') |
54 |
|
55 | Plug 'vim-airline/vim-airline' |
56 | Plug 'vim-airline/vim-airline-themes' |
57 | Plug 'tpope/vim-fugitive' |
58 | Plug 'scrooloose/nerdtree' |
59 | Plug 'ryanoasis/vim-devicons' |
60 | Plug 'tiagofumo/vim-nerdtree-syntax-highlight' |
61 | Plug 'vim-syntastic/syntastic' |
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 | " Airline |
78 | set laststatus=2 |
79 | let g:airline_powerline_fonts=1 |
80 | autocmd VimEnter * AirlineTheme deus |
81 |
|
82 | " NERDTree |
83 | let NERDTreeShowHidden=1 |
84 |
|