Skip to content
This repository has been archived by the owner on Oct 16, 2019. It is now read-only.

Inappropriate auto-close behavior if cursor is moved in INSERT mode. #72

Open
drmingdrmer opened this issue Sep 3, 2016 · 1 comment

Comments

@drmingdrmer
Copy link

Inappropriate auto-close behavior if cursor is moved in INSERT mode.

When cursor is moved and ESC pressed, vim-autoclose adds quote " at wrong position.

To reproduce this issue, first add a kep mapping to move cursor:

:inoremap <C-k> <C-r>=cursor(line("."),1) ? "" : ""<CR>

This let <C-k> to jump to the first column of the current line.

Type:

xx "abc

Till now it is correct and results in:

xx "abc"

Press <C-k> and then <ESC>. It goes to column 1 and completes quote " in a wrong place:

" "abc"

And I found that disabling AutoClosePreserveDotReg fixes this issue. But I do not know if there is any side effect with this:

let g:AutoClosePreserveDotReg = 0

@spidernetlabs found this issue with both this plugin and xptemplate enabled.

@ghost
Copy link

ghost commented Dec 20, 2018

@drmingdrmer I believe I have resolved this problem and #81 in my fork of the project. You can check it out here: https://github.com/whitehatzero/vim-autoclose

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant