On Saturday, November 28, 2015 at 3:56:25 PM UTC-6, Bram Moolenaar wrote:
> 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'.
Ah, good suggestion! I'll try training myself to do that.
>
> > 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.
>
Good to know. I'll try to see if I can reproduce without my plugins and mappings and such tomorrow.
--
--
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.
Sunday, November 29, 2015
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment