> -----Original Message----- > From: Corinna Vinschen [mailto:[EMAIL PROTECTED] > Sent: 06 March 2007 10:21 > To: vim-dev@vim.org > Subject: Jump to tag in a file opened in another session > > Hi, > > I've searched for this for some time now but it's either not available > or I have to hone my search skills a lot. > > Most of the time I have multiple xterms opened, running vim sessions > within the same project. The files are tagged and I'm using > :ta and :tj > a lot. It happens often that I'm about to jump to a tagged > function in > a file which I have opened in another xterm. What happens is that the > swap file is found and the "Swap file [...] already exists" message is > printed, giving the usual choice which has to be confirmed. > > The more often this happens, the more annoying it is. What I usually > want is to open the file readonly, because I just want to have a look > into that function. The actual editing of this file is done in the > other vim window. I can't find a way to accomplish this. I know > there's the shortmess=A option, but it avoids the attention > message in a > dangerous way: It doesn't print *any* warning and it allows > to edit the > file. If I really edit the file at this point, because I > miss the fact > that this is the same file as in the other xterm session, the first > warning appears in the second session only when trying to > write back the > changes made there. > > So, the bottom line is, I'm looking for is a way to open a file > automatically in r/o mode if I'm going to jump to a tag in that file > and the file is opened in another session. > > Is that possible already? If not, would it make sense to add > a setting > which enables this behaviour? >
My frequent problem as well and I also didn't find a way how to do it. Your suggestion seems to me very useful and practical, so if it cannot be done now, an addition you suggested would be extremely useful. ---Zdenek
smime.p7s
Description: S/MIME cryptographic signature