Skip to content
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

Undo #190

Closed
willurd opened this issue Feb 15, 2014 · 5 comments
Closed

Undo #190

willurd opened this issue Feb 15, 2014 · 5 comments

Comments

@willurd
Copy link

willurd commented Feb 15, 2014

First off, thanks for writing emmet-vim!

Ok, so my issue is with undoing an expansion. So let's say I do something like div+span and expand it. I realize I actually meant div>span, so I undo. I expect that undo would only revert the expansion, and would give me my text 'div+span' back so I can tweak it (that's how emmet plugins for other editors I've used work), but it actually undoes the text itself, leaving me with having to rewrite all of the text from memory. For such a small example it's not a big deal, but sometimes the html I'm trying to expand isn't so trivial. Is it possible with Vim to only undo the expansion?

@mattn
Copy link
Owner

mattn commented Feb 15, 2014

Could you please show me What you expect?. Please show me example.

@willurd
Copy link
Author

willurd commented Feb 15, 2014

Sure thing. For example, I open a brand new file and type div+span and expand it. This gives me <div></div><span></span>. I meant to type div>span, so I undo. At this point, it clears everything, leaving me with an empty file, but what I expect is to be given div+span back so I can edit it. Again, much more useful when working on very complicated examples.

@willurd
Copy link
Author

willurd commented Feb 15, 2014

I'll put it in this format, if it will make it more clear:

  1. Open an empty html file
  2. Type div+span
  3. Expand with <C-y>, (file contents are now: <div></div><span></span>)
  4. Undo (expected file contents: div+span, actual file contents (empty))

@mattn
Copy link
Owner

mattn commented Feb 17, 2014

Hmm, I can't reproduce it. What version of vim do you use?

@willurd
Copy link
Author

willurd commented Feb 17, 2014

That's what it was! I was on 7.3. I upgraded to 7.4 and now it works as expected. Thanks!

@willurd willurd closed this as completed Feb 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants