开发者

Is there a block undo in VIM?

In Vim, is there a way to开发者_JS百科 select a block of text and use undo to only undo changes to that block of text?

Let's say I rewrite a function, then go and make some changes elsewhere in my file. Afterwards, I realize that my first function implementation was indeed better. I'd like to undo the changes I made in that function, but leave my subsequent additions intact.

I don't know if this is even possible, but I often find myself wanting this feature.


Currently... No. Vim 7.3 has undo branches that you can traverse but as far as I know Vim does not pay attention to any selected text during an undo.


Maybe this:

  1. http://sjl.bitbucket.org/gundo.vim/
  2. http://stevelosh.com/blog/2010/09/coming-home-to-vim/
  3. https://github.com/tpope/vim-pathogen
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜