Saturday, April 1, 2023

Re: What's the point of the "-i" switch? was : How do I replicate vim settings across two machines?

Am 31/03/2023 um 14:40 schrieb Christian Brabandt:
>
> On Fr, 31 Mär 2023, 'Ottavio Caruso' via vim_use wrote:
>
>> Follow up to this thread, see bottom post. I have been messing about with
>> vim and I have used this command from my local machine:
>>
>> $ vim ~/external/docs/mlog -i ~/external/.viminfo
>>
>> From the manual:
>>
>> -i {viminfo}
>> Specifies the filename to use when reading or writing the
>> viminfo file, instead of the default "~/.viminfo". This
>> can also be used to skip the use of the .viminfo file, by
>> giving the name "NONE".
>>
>>
>> But when I use this syntax, the cursor mark is still not at the same place
>> where I left when I used vim directly on the remote machine.
>
> I suppose because the filename is still stored twice within the viminfo
> file with two different paths? Open your viminfo file (please make a
> backup of it before messing with it) and search for the filename, for
> which this issue occurs. You most likely find it there twice and you
> need to make sure to have it there only once (with whatever path you
> want to access the file).
>
>> So, my question is, what is the practical point of this switch?
>
> It uses a different viminfo file than the default one. By itself it
> won't help, because you still have the problem, that you are editing the
> same file under two different paths, so it looks like 2 different files
> for Vim.

Ok, thanks. It makes sense.

--
Ottavio Caruso

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/e006ecfe-35d6-7935-7f9d-805aaeefacc0%40yahoo.com.

No comments: