1

I'm using vi as my editor on a Mac OS X and I'm able to switch back and for between files in the buffer using the commands :bp and :bn. What I notice is that if files are not committed to Subversion then if I switch away from a file that is not committed to Subversion then it it doesn't save in the buffer.

However there's one file in particular that vi does not save in the buffer (even after I commit it to Subversion). Whenever I switch away from it using the commands mentioned above the only way I can go back to it is to open it manually.

For example if I'm working on foo.txt and then switch to bar.txt using the command :bn. If I then list the buffers using :ls only bar.txt is listed. Must be something that I'm missing about vi buffers.

Any ideas?

4

1 回答 1

1

:bd是缩写:bdelete,它卸载缓冲区并将其从缓冲区列表中删除。

如果要在缓冲区之间来回切换,请使用:bnand :bN:bN相当于:bp

于 2012-06-08T15:40:45.460 回答