Townk / vim-autoclose

This plugin for Vim enable an auto-close chars feature for you. For instance if you type an '(', ``autoclose`` will automatically insert a ')' and put the cursor between than.
http://townk.github.com/vim-autoclose/
503 stars 66 forks source link

using single quotes ends up inserting extra quote #2

Closed tmm1 closed 13 years ago

tmm1 commented 14 years ago

if i type "hello" I end up with "hello"

but if i type 'hello' I end up with 'hello''

wuputah commented 14 years ago

+1, I found this too. :)

wuputah commented 14 years ago

This patch seems to fix the problem, but I'm not sure why the code was there to begin with. Perhaps it was targeting a language where quote behavior is different.

https://github.com/wuputah/vim-autoclose/commit/c01db7691591208a2096cafa495c84f2c72c315c

wuputah commented 14 years ago

After some coding, I figured out that the code is trying to handle the case where a single quote is used as an apostrophe. The language where quote behavior is different is English!

Townk commented 13 years ago

Hey guys, I cannot access the repository on the comment anymore, but I'll look into this issue tonight!

Thanks

Townk commented 13 years ago

Just pushed a fix for this. Please test!

wuputah commented 13 years ago

Updated my comment with correct link, but I'm sure your patch is better. :)