DEV Community

Connor Bode
Connor Bode

Posted on

1 2

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

AWS GenAI LIVE image

How is generative AI increasing efficiency?

Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.

Learn more

Top comments (2)

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

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!

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay