On Thursday, December 12, 2013 1:10:07 PM UTC-6, Manuel Ortega wrote:
> > No.  I am now looking at my .viminfo, and there are lowercase marks in it.
> 
> 
> >  They live under the section with the heading "History of marks within
> 
> > files (newest to oldest):"  For instance, I opened my ~/.profile, went to
> 
> > line 166, hit "mb", and then now in viminfo there is now:
> 
> >
> 
> > > ~/.profile
> 
> > " 166 0
> 
> > b 166 0
> 
> 
> 
> They are not remembered across files. But nevertheless they might end
> 
> stored in your .viminfo file and that's why you think they are valid
> 
> across buffers.But that doesn't make mark b valid and magically jump to your
> 
> ~/.profile.
> 
> 
> 
> I never said it would make 'b magically jump to my profile if I'm currently 
> looking at something that isn't my profile.  I said lowercase marks are 
> associated with files.  And each lowercase mark a-z is a mark to a position 
> in...a *file*.  And each lowercase mark a-z is, in viminfo, listed under...a 
> *file*.  Therefore, lowercase marks are associated with files.
> 

They are NOT associated with files though. They are associated with a buffer. 
The buffer is associated with a file, but you cannot use the marks for that 
file unless you have that file in a buffer. The next time you create a buffer 
for that file, Vim restores the marks from your .viminfo file if you told it 
to, but you still can't use them if you're in a different buffer. Uppercase 
marks are different. You can always load a file from an uppercase mark, whether 
or not you have a buffer for it.

Just under :help :delmarks:

Lowercase marks 'a to 'z are remembered as long as the file remains in the
buffer list.  If you remove the file from the buffer list, all its marks are
lost.  If you delete a line that contains a mark, that mark is erased.

Lowercase marks can be used in combination with operators.  For example: "d't"
deletes the lines from the cursor position to mark 't'.  Hint: Use mark 't' for
Top, 'b' for Bottom, etc..  Lowercase marks are restored when using undo and
redo.

Uppercase marks 'A to 'Z include the file name.  {Vi: no uppercase marks} You
can use them to jump from file to file.  You can only use an uppercase mark
with an operator if the mark is in the current file.  The line number of the
mark remains correct, even if you insert/delete lines or edit another file for
a moment.  When the 'viminfo' option is not empty, uppercase marks are kept in
the .viminfo file.  See |viminfo-file-marks|.

------------------------------

Here it specifically says lowercase marks are lost when you remove a file from 
the buffer list.

It says nothing of the sort for uppercase marks, referred to in the same 
section as "file marks".

:bwipe removing lowercase marks is well documented and intentional. Removing 
uppercase marks is not documented and probably unintentional.

The way to remove all marks from a buffer, including file marks, is using 
:delmarks. Otherwise, true file marks should remain. :bwipe doesn't mean "I'm 
done with this file forever" it just means "I'm done with this file for this 
edit session."

You can individually turn on and off saving lowercase marks. If ANYTHING AT ALL 
is in the viminfo option, uppercase marks are preserved. This tells me file 
marks are meant to be more persistent than the lowercase marks. Right now they 
are not.

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