DEV Community

Connor Bode
Connor Bode

Posted on

Multiple Tabs in VIM

I've recently been transitioning to using VIM as my full time editor. There are a lot of tricks to learn, but I think I'm getting the hang of things.

One major advantage is that I can now proficiently edit code over an SSH connection.

Anyways, what you're here for:

Using multiple tabs in VIM

This is actually one of the simplest tricks to learn in VIM. There are three commands:

  • :tabnew <filename> (open a new tab)
  • :tabn (jump to the next tab)
  • :tabp (jump to the previous tab)
  • :q (close the file, which also closes the tab)

If you're using netrw, the default file browser, you can also open that up in a new tab by typing :tabnew .

Hope this helps!

Follow me here on or on Twitter @connorbode for more tips like this!

Top comments (2)

chsanch profile image
Christian Sánchez

Nice, I would recommend you to read too:

That post explains a good approach to use buffers, tabs, and windows.

connorbode profile image
Connor Bode

Yeah this is a really great resource actually (and probably the longest stackoverflow response I've ever seen).

Windows are just split screens right? Same functionality as tmux? If so I've been using them already.

Buffers are definitely something I'll need to check out, thanks for the tip!