Townk/vim-autoclose — Issue #27: Undo broken by autoclose plugin
Author: jordow
Created: 2012-02-26 05:42:56+00:00
State: open

set autoindent
set smartindent
set cindent " Bad for js, unless you set the following cino!
" Pretty decent js indentation without a plugin - wow!
set cino=-jJ1j1
" If really large declarative ui blocks - you might need to search far (50 lines)
set cino+=(50

With these settings, open up a file new.js (javascript)

type out the following code:

var x = {
asdf: 'hi'
};

without leaving insert mode. Then exit insert mode and type "u" for undo.
It does not undo everything, and leaves the trailing "}". What's really bad, is that when you Redo, it doesn't even redo correctly so your text is messed up forever.