Chris
Chris

Reputation: 1391

Vim: Delay after hitting gg

There is about a half second delay after I gg, which is extremely annoying. Other commands such as Shift-G work instantaneously, but with gg, I think there may be something in my .vimrc where vim is expecting another input.

My .vimrc is below if that helps. Thanks.

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

Upvotes: 0

Views: 184

Answers (1)

romainl
romainl

Reputation: 196566

I don't think you need to look further than:

let mapleader="g"       "for nerdcommenter

Since nerdcommenter defines a whole bunch of <leader> mappings, every time you press g Vim is going to wait a bit in order to decide if you wanted g or one of your many mappings starting with g.

g is a very bad <leader>, you should find an alternative.

Upvotes: 3

Related Questions