关于考场 vimrc
  • 板块灌水区
  • 楼主guodong
  • 当前回复9
  • 已保存回复9
  • 发布时间2021/10/20 13:07
  • 上次更新2023/11/4 03:11:28
查看原帖
关于考场 vimrc
81372
guodong楼主2021/10/20 13:07

问下各位 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>
2021/10/20 13:07
加载中...