0

Is it possible to have a new instance on vim in every tab? Because I want to have seperate buffers in each tab.

So I could run one tab for the controllers I'm editing, one for all my views etc.

RedlineR
  • 31
  • 1
  • As far as I know, to separate buffers you have to start separate instances of macvim - tabs share buffers. I suggest working with split panes - controller in one, view in the other. With Rails, plugins like [vim-rails](https://github.com/tpope/vim-rails) makes this very easy to do. I've written about this in a [blog post](http://novemberkilo.com/2011/02/Ode-to-vim/) - perhaps this might be of some benefit? – novemberkilo Dec 07 '12 at 08:59
  • 2
    What's the problem of using one Vim instance for all tabs; you can use `:windo` instead of `:bufdo` in each tab page?! – Ingo Karkat Dec 07 '12 at 09:06
  • @IngoKarkat ":windo buffers" wont work like you want it to... thats is the problem – RedlineR Dec 07 '12 at 09:59
  • Can you elaborate further on what exactly you want? Usually it is better to have a single instance of Vim. – mMontu Dec 07 '12 at 10:22

2 Answers2

0

As seen in comments I don't see why you should have different instances of vim, anyway you could try GNU screen or tmux to launch different vim sessions and switch beetween them.

Atropo
  • 12,231
  • 6
  • 49
  • 62
0

No, the tabs are already inside Vim and you obviously can't run Vim inside itself.

The only way for you to really have separate instances in MacVim is to use two different GUI windows.

It sounds like you are having troubles keeping track of your buffers, don't you?

romainl
  • 186,200
  • 21
  • 280
  • 313
  • Yes, once you have lots of files open it becomes hard to find the files in BufferGator. If you can remember the file names you can use CommandT or so but I always forget the names... – RedlineR Dec 07 '12 at 09:35
  • How many are "lots of files"? Did you consider switching to a different plugin or buffer management method? Also the point of CommandT and friends is that you don't have to remember filenames thanks to fuzzy matching. And what about `:[s]b`? You can go a long way with this command and wildcards and tab-completion… tags are also a very efficient way to navigate through a project. – romainl Dec 07 '12 at 10:23
  • Also use of `:bdelete` when the buffer count grows excessive can help a lot. – dash-tom-bang Dec 12 '12 at 20:35