DEV Community

Discussion on: How to Use Tabs in vim

Collapse
 
moopet profile image
Ben Sinclair

I like thinking of tabs the same way tmux thinks of windows - that is, I rarely use them but when I do it's to make separate workflows.

A couple of things confused me about your post. Are you running some sort of vim "distribution" that changes the default way of working?

Out the box, neither tabedit or tabnew create a file, they just open a tab. If you write that buffer later, then they will try to create the corresponding file if it doesn't already exist. They also don't open a buffer in insert mode, unless you've made some modifications to your config.

You can get heavily customised layouts using a combination of tabs and windows, so something else that's useful to look into is sessions (made with :mksession) which let you save the whole layout. Kind of like a workspace in an IDE.

Collapse
 
grepliz profile image
Liz Lam

Yes, you are right! I'll update the blog to be more clear about actually needing to write the buffer before the file is actually created. So on my Mac, I can just start typing and I'm in insert mode. I suspect this may be different on Linux. I'll update to make that clearer too. Thanks for your input and questions!!