Tuesday, November 24, 2015

Open fold above current line in diff mode

Diff mode folds huge swaths of a file a lot of the time. So when I want to view some context around a diff, it is very inconvenient to place the cursor on the fold and use zo, because then the spot I was looking at jumps off-screen.

So I can do :-1foldopen with my cursor *below* the fold to keep the part of interest right where I want it.

But, this doesn't open the fold in both sides of the diff, unlike when I use zo.

Is there a better way to show more context in a diff for a *specific* change. I don't want to use zr to unfold *everything*, just the one fold above the current change.

Also, is this the intended behavior of :foldopen, that it doesn't act on both sides of a diff?

--
--
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:

Post a Comment