-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc.min
60 lines (57 loc) · 1.4 KB
/
vimrc.min
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
57
58
59
60
let mapleader=','
filetype plugin indent on
syntax enable
" Settings
set nocompatible
set number
set relativenumber
set ruler
set mouse=a
set autowrite
set autoread
set bs=indent,eol,start
set noshowmode
set hidden
set nojoinspaces
set tabstop=4
set shiftwidth=4
set softtabstop=4
set shiftround
set expandtab
set autoindent
set smartindent
set pumheight=15
set completeopt=menuone,longest
set list
set listchars=tab:\ \ ,trail:•,extends:#,nbsp:.
set foldmethod=indent
set foldlevelstart=99
set incsearch
set cursorline
set synmaxcol=2048
set lazyredraw
set updatetime=100
set ignorecase
set smartcase
set hlsearch
" Key mapping
map <leader>s :source ~/.vimrc<cr>
map <leader>e :e! ~/.vimrc<cr>
map <leader>l :nohlsearch<cr>
imap jk <ESC>
inoremap <expr> <TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
inoremap <expr> <S-TAB> pumvisible() ? "\<C-p>" : "\<TAB>"
inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
nnoremap <leader>] :bnext<CR>
nnoremap <leader>[ :bprev<CR>
nnoremap <leader>cf :let @+=expand("%")<CR>
nnoremap <leader>bd :bufdo bd<CR>
nnoremap <leader>a :cclose<CR>
inoremap ;; <C-o>A;
inoremap ,, <C-o>A,
nnoremap ;; A;<Esc>
nnoremap ,, A,<Esc>
hi MatchParen cterm=bold ctermbg=white ctermfg=darkRed
hi IncSearch cterm=bold,underline ctermbg=none ctermfg=darkRed
hi CursorLine ctermfg=none ctermbg=18 cterm=bold guifg=white guibg=yellow gui=bold
hi CursorLineNr term=bold ctermfg=white gui=bold guifg=white