Ben Fritz wrote:
> 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.
What I usually do: "0b". This means: go to start of the line and back
one word, thus ending up at the end of the last line in the fold and
opending that fold. This requires "hor" in 'foldopen'.
> Also, is this the intended behavior of :foldopen, that it doesn't act
> on both sides of a diff?
No, the folds in diff mode should be in sync.
--
hundred-and-one symptoms of being an internet addict:
148. You find it easier to dial-up the National Weather Service
Weather/your_town/now.html than to simply look out the window.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
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.
Saturday, November 28, 2015
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment