Christian Brabandt wrote:
> On Fr, 08 Jan 2016, Charles E Campbell wrote:
>
> > Ben Fritz wrote:
> > > On Friday, January 8, 2016 at 2:33:04 AM UTC-6, Christian Brabandt wrote:
> > >> Having said that, I personally don't like the <restore> argument as
> > >> well. Perhaps we could use a new command modifier like
> > >> :keeppos windo ...
> > >>
> > >> That could be useful for other commands as well.
> > >>
> > > I like that idea better as well.
> > >
> > I, too, like the "keeppos" (short for keepposn?) command modifier.
> >
> > I agree that one shouldn't change the default behavior due to backwards
> > compatability considerations. My own plugins typically do a
> > save&restore position and so wouldn't be affected by whether or not that
> > default behavior changed.
> >
> > One thing about keepposn, though: a lot of the save&restore position
> > commands currently available keep the cursor in the same place in the
> > text, but don't keep the text in the same position on the screen.
> > Consequently using these causes the text to bounce around, which IMHO is
> > unacceptable. For example,
> >
> > :set ve=all
> > :help getcurpos()
> > :let scp= getcurpos()
> > :norm! 4k4zl
> > :call setpos('.',scp)
> >
> > This set of operations restores the cursor position in the text, but
> > does not restore the text position relative to the window.
>
> Yes, that is the idea and that is what the <restore> argument already
> does. I believe however, that the :keeppos modifier is a lot more
> effort. I'll check this within the next week.
We could use either the <restore> argument or a :keeppos modifier.
Both have advantages and disadvantages. I think the problem with
:keeppos is that this gives the idea that it works for all commands,
while only a few commands will actually support it.
On the other hand, for a command like :s, a <restore> argument isn't
really possible, would need to use a flag, which means different
commands have different ways to keep the position.
--
<Beeth> Girls are like internet domain names,
the ones I like are already taken.
<honx> Well, you can stil get one from a strange country :-P
/// Bram Moolenaar -- [email protected] -- 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_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.