Wednesday, January 14, 2015

Any automatic bracket-insertion plugins not breaking undo?

A feature I've been missing ever since just before Vim 7.4 came out, is
the automatic closing of matched characters. E.g. if I insert abc(def I
want to get abc(def|) where '|' denotes my cursor. Then if I type the
closing ) I want my cursor to jump over the existing ) rather than
inserting a second one.

If that's all I wanted, some fairly simple mappings can do the job for
me. But, after inserting "abc(def[ghi])", I want to be able to undo that
insertion, and redo that insertion, and potentially even REPEAT that
insertion, as if I had typed it all out manually in one insert.

Previously, I used delimitMate for this.
contains a list of plugins for this, some of which in Vim 7.3 or earlier
accomplished my goal of keeping the undo sequence intact. But since Vim
7.4 these all broke.

Is there a plugin out there that has found a reliable way to do this?

I know there is an open pull request on delimitMate that supposedly
fixes undo/redo in many cases, but I gather there are still some cases
where it breaks, and I have the impression it's not ready for general
consumption yet.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: