Hi Charles!

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.

Best,
Christian
-- 
Viele verlieren den Verstand deshalb nicht, weil sie keinen haben.
                -- Arthur Schopenhauer

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

Raspunde prin e-mail lui