我所有其他的键绑定工作正常,但jj由于某种原因我无法绑定逃脱.捣碎jk或kj不起作用.这是我的整个.vimrc:
"Maps for jj to act as Esc
inoremap jk <Esc>
inoremap kj <Esc>
"inoremap jj <Esc>
ino jj <Esc>
cno jj <C-c>
set number
set nocompatible
set paste
"fix cygwin backspace problem
set backspace=indent,eol,start
fixdel
set autoindent
set smartindent
set tabstop=4
set shiftwidth=4
"use spaces instead of \t
"set expandtab
set nowrap
syntax on
highlight ExtraWhitespace ctermbg=darkgreen guibg=lightgreen
autocmd Syntax * syn match ExtraWhitespace /\s\+$\| \+\ze\t/
"remove trailing whitespace
"http://vim.wikia.com/wiki/Remove_unwanted_spaces#Automatically_removing_all_trailing_whitespace
"autocmd BufWritePre * :%s/\s\+$//e
autocmd BufWritePre *.c :%s/\s\+$//e
autocmd BufWritePre *.cpp :%s/\s\+$//e
autocmd BufWritePre *.c++ :%s/\s\+$//e
autocmd BufWritePre *.h :%s/\s\+$//e
autocmd BufWritePre *.java :%s/\s\+$//e
autocmd BufWritePre *.php :%s/\s\+$//e
autocmd BufWritePre *.pl :%s/\s\+$//e
autocmd BufWritePre *.py :%s/\s\+$//e
"autocmd FileType c,cpp,c++,java,php,pl,py autocmd BufWritePre <buffer> :call setline(1,map(getline(1,"$"),'substitute(v:val,
"search options
set incsearch
set ignorecase
set showmatch
nmap <space> zz
nmap n nzz
nmap N Nzz
"set arrow keys to move between buffer / tabs
inoremap <Up> :bprev<CR>
inoremap <Down> :bnext<CR>
inoremap <Left> :tabprev<CR>
inoremap <Right> :tabnext<CR>
noremap <Up> :bprev<CR>
noremap <Down> :bnext<CR>
noremap <Left> :tabprev<CR>
noremap <Right> :tabnext<CR>
set vb t_vb=
set guioptions-=T
"set foldmethod=indent
set showtabline=2
"au BufWinLeave * mkview
"au BufWinEnter * silent loadview
Run Code Online (Sandbox Code Playgroud)
对于记录,timeoutlen设置为默认值1000毫秒.
| 归档时间: |
|
| 查看次数: |
2673 次 |
| 最近记录: |