Moving between tabpages
We’ve just learned how to create new tabpages. But that’s not much use without knowing how to move between them!
Moving between tabpages is really easy in Vim. You can use:
gtto go to the next tabpagegTto go to the previous tabpage[count]gtto go to the[count]’th tabpage — e.g.2gttakes you to tabpage number 2
Let’s try this in the editor. Like before, open 4 or 5 new tabpages with the :tabnew command. For each new tabpage, write something distinctive inside the buffer. Then, try switching between them with gt, gT, and [count]gt. As you move through them, you’ll notice that the highlighting on the tabline at the top changes to reflect which tabpage you’re currently on.