Score:0

How to come out to the previous file in vi after entering a file with 'gf'?

za flag

I searched for this but couldn't find it.
When using vi for a file A, if I want to go to a file B when the cursor is on file B's filename, I press 'gf' and vi opens file B. After navigating inside file B, if I want to come out to file A, what is the correct key? I know that if I press 'ctrl+o' several times, I can come back to file A, and if I do ':rewind', I can come back out to the first file that I opened with vi. But I want to know the key to come back out just one file when I went into a file using many 'gf' commands.

ADD
I found from the official vi manual (https://www.vi-improved.org/vimusermanual.pdf), that I can mark a global position(not local to a file) using capital letter, and can come to that position while editing another file by coming to that tag. Like mF in file A and the in file B 'F to come to the mark 'F' in file A. This is usually what I want but I'm curious if I can come out just one file as in my question.

Zatigem avatar
ru flag
[Vi and Vim Stackexchange](https://vi.stackexchange.com/) seems a better place for this question.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.