Ilya Esteban wrote:

[reordered]

> On Wednesday, February 6, 2013 3:33:35 AM UTC-8, Bram Moolenaar wrote:
> 
> > The mark is stored in the viminfo file.  When exiting Vim the current
> > 
> > marks and the ones in the viminfo file are merged.  You can see this if
> > 
> > you set the mark elsewhere, then delete it, after restarting Vim you get
> > 
> > the old position.
> > 
> > 
> > 
> > Only way to really remove it is by editing the viminfo file.
> > 
> > Or you can start vim with "-u NONE" to avoid using the viminfo file.
>
> Thanks for the clarification. I think it would make sense to change
> the behavior so that when exiting Vim the viminfo file just saves all
> the currently active marks, rather than the union of the current marks
> + all the deleted marks.

That doesn't work if you have multiple Vim programs running and they
exit in any order.  A mark set in one Vim would be removed by a Vim that
exits later.

> Two reasons:
> 
> 1) All files with marks get loaded into hidden buffers on startup. So
> if you have a bunch of files you once marked, they will keep getting
> loaded even if you dont need them anymore (with the additional
> side-effect that any new buffers you create during your session start
> with a double digit ID number)

I wonder who does this, doesn't happen for me.

> 2) If you use a plugin or a customization that visually shows the
> marks, you end up with visual garbage in your files (the old tags),
> that you cant get rid of unless you delete viminfo or reuse the marks
> in a different file.

Solving this properly would require storing the time when a mark was set
and when it was deleted.  That's a bit complicated.  A simple workaround
is to set the mark in a file that you don't use.

-- 
ARTHUR:  No, hang on!  Just answer the five questions ...
GALAHAD: Three questions ...
ARTHUR:  Three questions ...  And we shall watch ... and pray.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// 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/groups/opt_out.


Raspunde prin e-mail lui