tpope / vim-endwise

endwise.vim: Wisely add

Home Page:https://www.vim.org/scripts/script.php?script_id=2386

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Delay on enter press

IngoMeyer441 opened this issue Β· comments

First, thanks for this nice Vim plugin. πŸ‘
Since version 1.3 I experience delays on hitting the enter key (<CR> in insert mode). I have tested this when only this plugin was enabled in NeoVim commit 79dcd045d3623ff71903e2806be489bd5fe3200d. You can hit enter multiple times without the cursor moving onwards on screen. Only pressing another key than enter or leaving the insert mode inserts the blank lines. This happens even in empty files. In original Vim (version 8.2 with patches 1-4464) I could not reproduce the same behavior.

Let's start by checking :verbose imap <CR>. It could be a few different things depending on if you have another plugin that also maps it.

:verbose imap <CR> returns:

i  <CR>        & <CR><SNR>14_(endwise-append)
        Last set from ~/.vim/dein/.cache/init.vim/.dein/plugin/endwise.vim line 140

For testing, I used this quite minimal vimrc:

set nocompatible

set runtimepath+=~/.vim/dein/repos/github.com/Shougo/dein.vim
if dein#load_state(expand('~/.vim/dein'))
    call dein#begin(expand('~/.vim/dein'), expand('~/.vimrc'))

    call dein#add('tpope/vim-endwise')

    call dein#end()
    call dein#save_state()
endif

Wow, that was fast. Thank you very much for reporting this upstream. I wrongly assumed your latest plugin updates were causing this bug. πŸ˜