It's quite possible that you may be working on several projects at once, having tabs set up can be a cool way to multi-task without having to see all of your files at once.
If you want to start Vim with more than one file, run vim -p filename1 filename2. This will open each file in its own tab.
Already in a Vim session? You can open a new tab with :tabnew filename to open (or create) a file.
To switch to the next (right) tab use gt in command mode. To switch to the previous (left) tab, use gT.
To close a tab you can use :q. If you're editing one file in a tab and use :wq Or you can use :tabc to save & close it.
If you want to start Vim with more than one file, run vim -p filename1 filename2. This will open each file in its own tab.
Already in a Vim session? You can open a new tab with :tabnew filename to open (or create) a file.
To switch to the next (right) tab use gt in command mode. To switch to the previous (left) tab, use gT.
To close a tab you can use :q. If you're editing one file in a tab and use :wq Or you can use :tabc to save & close it.