DEV Community

loading...

Multiple Tabs in VIM

connorbode profile image Connor Bode ・1 min read

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 dev.to or on Twitter @connorbode for more tips like this!

Discussion

pic
Editor guide
Collapse
chsanch profile image
Christian Sánchez

Nice, I would recommend you to read too:

stackoverflow.com/questions/267088...

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

Collapse
connorbode profile image
Connor Bode Author

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!