This is how I use vim's tabs:
I have shortcuts to move a tab to left/right with <ctrl>j
<ctrl>k
and to move between tabs with <ctrl>h
, <ctrl>l
. According to answer to this question, I'm doing it wrong. How to effectively use buffers then? Constantly listing hidden buffers to know which to switch to doesn't seem like an imprevement.
There is no right or wrong way of handling buffers in Vim. First, learn and understand the difference between buffers, windows, and tab pages. Then adopt a style that suits you. There are many "buffer management" plugins on http://www.vim.org/, but you can also just use the built-in commands like :buffer
together with file completion.
If you solely stick to the "one file per tab" rule (like in a browser), you're losing the benefits of window splits, and you'll still occasionally encounter splits in the form of the preview and quickfix windows, and in order to use diff mode.
I mostly use tab pages to separate different workspaces (I only have a single GVIM instance running); sometimes I open the same set of buffers in different tabs in different arrangements, like the perspectives in IDEs such as Eclipse.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With