forked from haruue-archive/mintty_vimrc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
57 lines (44 loc) · 944 Bytes
/
.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
" disable vi compat mode
set nocp
" set map leader
let mapleader=";"
" encoding & file format
set fenc=utf-8
set fileencodings=utf-8,gb2312,gbk,gb18030
set termencoding=utf-8
set fileformats=unix
set encoding=utf-8
" line number
set number
" tab split & shift width
set ts=4
set shiftwidth=4
set expandtab
" syntax highlight
syntax enable
colorscheme monokai
" fonts for gVim
set guifont=Consolas:h10:cANSI
" fix mouse
set mouse=a
" sudo :w
map <leader>sudo :w !sudo tee %
" fix backspace
set backspace=2
" search
set hlsearch
set incsearch
" indent
set autoindent
set cindent
set smartindent
set showmatch
" key map for auto insert right bracket
inoremap ( ()<left>
inoremap [ []<left>
inoremap {<enter> {<enter>}<up><ESC>o
inoremap " ""<left>
inoremap ' ''<left>
" only enable with ;html because we usually need to input lt & gt singlely
noremap <leader>htmlon :inoremap <lt> <lt>><lt>left>
noremap <leader>htmloff :iunmap <lt>