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>1 1gt |
15 | noremap <leader>2 2gt |
16 | noremap <leader>3 3gt |
17 | noremap <leader>4 4gt |
18 | noremap <leader>5 5gt |
19 | noremap <leader>6 6gt |
20 | noremap <leader>7 7gt |
21 | noremap <leader>8 8gt |
22 | noremap <leader>9 9gt |
23 |
|
24 | map <leader>n :NERDTreeToggle<CR> |
25 |
|
26 | " Vim style configuration |
27 | syntax on |
28 |
|
29 | set showcmd |
30 | set showmatch |
31 |
|
32 | set number |
33 | set numberwidth=6 |
34 | highlight LineNr term=bold ctermfg=grey |
35 |
|
36 | set tabstop=4 |
37 | set shiftwidth=4 |
38 | set smarttab |
39 |
|
40 | highlight VertSplit ctermbg=NONE ctermfg=NONE term=NONE cterm=NONE gui=NONE |
41 |
|
42 |
|
43 | " Enable Plug plugins |
44 | call plug#begin('~/.vim/plugged') |
45 |
|
46 | Plug 'vim-airline/vim-airline' |
47 | Plug 'vim-airline/vim-airline-themes' |
48 | Plug 'tpope/vim-fugitive' |
49 | Plug 'scrooloose/nerdtree' |
50 | Plug 'ryanoasis/vim-devicons' |
51 | Plug 'tiagofumo/vim-nerdtree-syntax-highlight' |
52 | Plug 'vim-syntastic/syntastic' |
53 | Plug 'bling/vim-bufferline' |
54 |
|
55 | call plug#end() |
56 |
|
57 |
|
58 | " Automatically install any Plug plugins |
59 | autocmd VimEnter * |
60 | \ if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) |
61 | \| PlugInstall --sync | q |
62 | \| qa! |
63 | \| endif |
64 |
|
65 |
|
66 | " Plugin configuration |
67 |
|
68 | " Airline |
69 | set laststatus=2 |
70 | let g:airline_powerline_fonts=1 |
71 | autocmd VimEnter * AirlineTheme deus |
72 |
|
73 | " NERDTree |
74 | let NERDTreeShowHidden=1 |
75 | autocmd VimEnter * NERDTree |
76 |
|