Raimondi / delimitMate

Vim plugin, provides insert mode auto-completion for quotes, parens, brackets, etc.
http://www.vim.org/scripts/script.php?script_id=2754
1.98k stars 117 forks source link

Duplicates trailing text when adding delimiters #105

Closed jcelliott closed 11 years ago

jcelliott commented 12 years ago

Great plugin all around. However I've run into a problem:

inserting ' or " before a matched pair duplicates the text that follows it. For example: type {"test":5} then go to the first character and type (insert mode) " result: "{"test":5}"{"test":5}

Raimondi commented 12 years ago

How do you go to the first character? could you give the sequence of keys you actually press?

jcelliott commented 11 years ago

Forgot to reply to this. It happens no matter what sequence of keys I press to get to the beginning (h many times, 0i, I). I tested with all my other plugins disabled with the same results. If the text is indented it still happens, but only if the cursor is at the beginning of the line. An actual sequence of keys would be: i{"test":5}[home]" where [home] means pressing the home key.

Raimondi commented 11 years ago

I can reproduce it. I'll se into into it.

Thanks!