问下各位 vimer 的 vimrc 配置文件都多长啊?我今天精简了一下我的 vimrc 发现有 50 行,背不完了 /kk
se udf
set hlsearch
set backspace=2
set nocompatible
set wildmode=list:longest
func SkipPair()
if getline('.')[col('.') - 1] == ')' || getline('.')[col('.') - 1] == ']' || getline('.')[col('.') - 1] == '"' || getline('.')[col('.') - 1] == "'" || getline('.')[col('.') - 1] == '}'
return "\<ESC>la"
else
return "\t"
endif
endfunc
" 将tab键绑定为跳出括号
:inoremap <tab> <c-r>=SkipPair()<CR>
set noswapfile
set number
inoremap { {}<ESC>i
inoremap ( ()<ESC>i
inoremap {<cr> {<cr>}<ESC>O
inoremap [ []<left>
inoremap ' ''<left>
inoremap " ""<left>
set cindent
highlight CursorLine cterm=NONE ctermbg=black
set cursorline
inoremap kj <ESC>
nnoremap ! $i<right>
nnoremap <C-]> <esc>ggvG"+y
nnoremap J 4j
nnoremap H 4h
nnoremap L 4l
nnoremap K 4k
set clipboard+=unnamedplus
syntax on
nnoremap <mapleader>s :call Sample()<CR>
func! Sample()
exec "vsp data.in"
endfunc
inoremap <F6> :call Compile()<CR>
nnoremap <F6> :call Compile()<CR>
func! Compile()
exec "w"
exec "!g++ % -g -o %< -DTSUKIAKIOI -Wall -DHJWWWW -DNICEGUODONG -std=c++14"
exec "!./%<"
endfunc
noremap <F7> :call Debug()<CR>
func! Debug()
exec "w"
exec "!g++ % -g -o %< -DTSUKIAKIOI -Wall -DHJWWWW -DNICEGUODONG -std=c++14"
exec "!gdb -tui ./%<"
endfunc
" colorscheme monokai
let mapleader=' '
nnoremap <leader>q :wq<cr>
nnoremap <leader>d ggvGddd
nnoremap <leader>s :vsp data.in<cr>