Vim: getting back and forth between two files.
Hi:
I do 'vim foo1.txt foo2.txt'. How do I switch from one file to the other? Any hint will be welcome. |
Here's a vi/vim cheat sheet. I think what you want is towards the bottom:
http://www.worldtimzone.com/res/vi.html |
Thanks a lot, mlangdn.
|
Hi,
Code:
vim foo1.txt Code:
:e foo2.txt Code:
:e # |
Previous buffer
Code:
:bp Code:
:bn |
Quote:
|
Quote:
|
Well, this works if you edit one file after another, when editing two buffers simultanously, you may use the code of barriehie in post #5
But if you edit both files simultanously with "vim foo1.txt foo2.txt" you'll have to use ":bp" or ":bn" once and may use ":e #" afterwards to switch between the two files. Markus |
Vim's powerful.
|
All times are GMT -5. The time now is 06:31 AM. |