Launch vim without any arguments, and perform this experiment. The files a, b, c and d used in the experiment below need not exist.
- Execute
:e a
- Execute
:tabe b
- Execute
:tabe c
- Execute
:tabe d
- Execute
:ls
- Press Enter to remove the output of the previous command
- Execute
gt
- Execute
:ls
This is the output of step 5.
:ls
1 a "a" line 0
2 a "b" line 0
3 #a "c" line 0
4 %a "d" line 1
Press ENTER or type command to continue
This shows that "c" is the alternate file (marked with #
) and "d" is the current file (marked with %
). So far, we see what is expected as per the documentation. If there is an existing current file, then it becomes the alternate file when we make some other file the current file.
But the output of step 8 is the following.
:ls
1 %a "a" line 1
2 a "b" line 0
3 a "c" line 0
4 a "d" line 0
Press ENTER or type command to continue
Now "a" has become the current file as expected. It is marked with %
. But "d" has not become the alternate file now. The file "d" is not marked with #
anymore. Why hasn't "d" become the alternate file?