-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exiting insert mode adds char at EOL #81
Comments
OK let me test with your vimrc. since I did not experience something like this, do you have any plugin installed that might change user-typing behaviors? |
yeah. I see a list of plugins in your .vimrc:) |
I tried several times but failed to reproduce this issue with all your plugins or with only xptemplate enabled. What is the exact key sequence you typed to produce the result in the gif? Sorry in the gif it is not very clear what you typed. I tested it on my macbook, with VIM 7.4 Included patches: 1-2152 . what is your VIM version? |
So the key sequence is: press I've tried running vim with no plugins ( Vim version is the latest offered by arch Linux: 7.4.2143-1 |
I believe it is definitely an issue with Plugin 'Townk/vim-autoclose', in your vimrc at 74 line.
If you manually close the quotes around I will have a deeper look at vim-autoclose. Maybe I can fix it in xptemlate or maybe a patch to vim-autoclose is required. By the way. xptemplate provides quote/bracket auto-completion mechanism. Just add this to your vimrc:
|
I found that adding this line to vimrc removes this issue:
Obviously vim-autoclose does not deal with cursor-moving in INSERT mode very well. It assumes when I posted an issue to vim-autoclose describing how to reproduce this issue, maybe the author has a better way to solve this. Townk/vim-autoclose#72 |
Thanks for finding the real issue, hopefully the author can fix it, otherwise I'll deal with it by using the workaround or by using something else. |
Like the title says and as this gif shows exiting Insert mode using the ESC key causes a char to be added at the end of line. It happens with other functions too, like
malloc()
.Another example is if I use xptemplate to write
printf("%d\n", (3+2));
It causes a ')' to be added after the ';', giving meprintf("%d\n", (3+2));)
If I manually type it (without using xptemplate) it behaves like usual. No extra char is added.
vimrc: http://nopaste.linux-dev.org/?1119832
The text was updated successfully, but these errors were encountered: