在gg
之后有大约半秒的延迟,这非常烦人。其他命令,如 Shift - G 即时工作,但对于gg
,我认为我的.vimrc
中可能存在某些内容,其中vim期待另一个输入
如果有帮助,我的.vimrc
就在下方。感谢。
call plug#begin('~/.vim/plugged')
"Plug 'valloric/youcompleteme'
Plug 'scrooloose/syntastic'
Plug 'tpope/vim-rails'
Plug 'vim-ruby/vim-ruby'
"autocomplete
Plug 'honza/vim-snippets'
Plug 'garbas/vim-snipmate'
Plug 'ervandew/supertab'
Plug 'MarcWeber/vim-addon-mw-utils'
Plug 'tomtom/tlib_vim'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-endwise'
Plug 'tpope/vim-repeat'
"comments
Plug 'scrooloose/nerdcommenter'
Plug 'tpope/vim-commentary'
Plug 'kien/ctrlp.vim'
Plug 'wakatime/vim-wakatime'
Plug 'Yggdroot/indentLine'
Plug 'terryma/vim-multiple-cursors'
Plug 'itchyny/lightline.vim'
Plug 'matze/vim-move'
Plug 'jacoborus/tender'
Plug 'craigemery/vim-autotag'
Plug 'flazz/vim-colorschemes'
Plug 'jiangmiao/auto-pairs'
Plug 'justinmk/vim-syntax-extra'
Plug 'svermeulen/vim-easyclip'
call plug#end()
" toby vim
set expandtab
set tabstop=4
set softtabstop=4
set shiftwidth=4
set backspace=indent,eol,start
set mouse=a
set statusline+=%f
set number
set linebreak
set ruler
set showcmd
set smartcase
set laststatus=2
set incsearch " search as characters are entered
set foldenable " enable folding
nnoremap E ^
" Line Numbers
set number
set relativenumber
augroup lineNums
autocmd!
autocmd InsertEnter * set norelativenumber
autocmd InsertLeave * set relativenumber
augroup END
" Copy Paste to System Clipboard
set clipboard=unnamed
let mapleader="g" "for nerdcommenter
nnoremap gcc :call NERDComment(0,"toggle")<CR>
filetype plugin on
" If you have vim >=8.0 or Neovim >= 0.1.5
if (has("termguicolors"))
set termguicolors
endif
" Theme
syntax enable
set background=dark
colorscheme molokai
let t_Co=256
" set lighline theme inside lightline config
" let g:lightline = { 'colorscheme': 'wombat' }
"vim-move
let g:move_key_modifier = 'C'
" syntastic settings
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
" :ca off SyntasticToggleMode
:ca WQ wq
:ca Wq wq
:ca wQ wq
答案 0 :(得分:3)
我认为你不需要看得更远:
let mapleader="g" "for nerdcommenter
由于nerdcommenter定义了一大堆<leader>
映射,每次按下g
时,Vim会等待一段时间以确定是否需要g
或其中一个以g
开头的映射。
g
非常糟糕<leader>
,您应该找到替代方案。