How to efficiently manage tabs / buffers in vim?

This is how I use vim tabs:

enter image description here

I have shortcuts to move the tab left / right with <ctrl>j <ctrl>k and move between tabs with <ctrl>h , <ctrl>l . According to the answer to this question , I am doing it wrong. How to use buffers effectively? The constant listing of hidden buffers to know what to switch to doesn't seem impressive.

+6
source share
1 answer

There is no right or wrong way to handle buffers in Vim. First, learn and understand the difference between buffers, windows, and tabs. Then accept the style that suits you. There are many plugins for managing the buffer at http://www.vim.org/ , but you can also just use the built-in commands, such as :buffer , along with the completion of the file.

If you adhere to the rule of “only one file per tab” (for example, in a browser), you lose the benefits of splitting windows and you will still encounter splits in the form of preview and quick delete windows, and to use diff mode.

I mainly use tabs to separate different workspaces (I only have one GVIM instance); sometimes I open the same set of buffers on different tabs in different devices, for example, in an IDE, for example Eclipse.

+6
source

Source: https://habr.com/ru/post/925855/


All Articles