On 2013-02-06 Wednesday at 09:23 -0800 Ilya Esteban wrote: > 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. > > 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) > > 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.
grep -C1 wviminfo /etc/vim/vimrc -------------------------------- " to write ALL changes to .viminfo, e.g. deletion of text marks, following wviminfo! is REQUIRED: au VimLeavePre * wviminfo! " viminfo „metadata“ e.g. textmarks are ONLY useful if in sync with related „content“, thus when writing edited files write viminfo SIMULTANEOUSLY. au BufWritePost * wviminfo! -- Roland Eggner
pgp5xT8OwVuVS.pgp
Description: PGP signature
