On Mon, May 25, 2015 at 3:44 PM, Carlo Baldassi <[email protected]> wrote:
> On Saturday, May 23, 2015 at 10:52:16 PM UTC+2, Justin M. Keyes wrote:
>> But why can't keepjumps be made recursive instead?
>
> That's the first thing I thought too. Of course it would break existing code, 
> so it should be something else, perhaps keepjumps!. But it also seemed a more 
> complicated and

:keepjumps! is definitely more palatable IMO from a user-interface perspective.

>> These one-off commands ("keepjumps", "lockjumps", etc, etc) are
>> extremely disappointing to me. Why can't there be, instead, a general
>> mechanism to save/restore these lists? Similar to
>> winsaveview()/winrestview(), except, you know--not a band-aid
>> solution. A *general* solution.
>
> I'm open to suggestions, but I don't see what you have in mind exactly. Care 
> to elaborate?

I'm thinking of something like the histadd()/histget() family of
functions, but more generic: expose the jumplist, marks list,
changelist, yanks list, etc., as Lists. So for example, in the
use-case of your patch, instead of locking the list, just save it and
restore it:

let j = v:jumplist
normal %
let v:jumplist = j

Anyways, it's not fair to expect you to solve this, it's a
far-reaching design decision in Vim. I think :keepjumps! is a good
compromise.


Justin M. Keyes

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