VIM^s#01 Switch between two opened files on VIM

This is my first post for the vim shortcut series (VIM^s#0x) that I am starting. I would in short call it as ‘VIMss’.

Open the first file in the vim editor
eg., vim -o file1.txt
This should show the file opened in vim.
Now, try opening another file through the following command
eg., :e file2.txt
This should close the first file and open you the file2.txt
To switch between file1.txt and file2.txt, just type the following.
eg., :e #
You should see the file2.txt is closed and file1.txt is opened on the screen for editing.

Hope you find this tip useful. Watch out for more tips.

About this entry