Skip to content

jaxbot/selective-undo.vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

selective-undo.vim

Sparked by this discussion on r/vim, I put together a selective undo plugin for Vim.

This plugin is designed to operate undo on a visual selection, without touching the rest of the file.

Here's how it looks right now:

It was a pretty fun problem to solve.

It, however, is not complete. There are plenty of bugs, and a bit of limitations/quirkiness:

  • Only operates on lines, not visual blocks
  • It doesn't know when you run out of undo stacks, so repeatedly pressing undo can do weird things at the end of the stack.
  • Probably a lot more

I'm open to pull requests and improving this, as I think this would be a really useful feature to have in my workflow.

That being said, this is based around a hack, so don't expect anything amazing from the code.

Enjoy!

MIT Licensed

Shameless plug

I hack around with Vim plugins a lot; if that sounds interesting to you, or you want to make my day, follow me :)

About

Selective undo for Vim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published