radiantRazor
radiantRazor

Reputation: 489

vim: Making tabbed behaviour default

TIL that vim 7 has the ability to work with tabs which is cool. Is there a way to tell vim through .vimrc that whenever I open multiple files, open them in tabs [instead of having to use -p always]

Upvotes: 2

Views: 358

Answers (2)

Christian Brabandt
Christian Brabandt

Reputation: 8248

Hm, I think slightly better then the tabedit autocommand from Ingo is

:au VimEnter * set tabpagemax=9999|sil tab ball|set tabpagemax&vim

which at least avoids the empty tabpage being created.

Upvotes: 3

Ingo Karkat
Ingo Karkat

Reputation: 172570

How about this:

:autocmd VimEnter * argdo tabedit

This edits each file in the argument list (i.e. all files passed on the command line) in a new tab page. It's probably still a bit raw and doesn't handle corner cases too well, but see this as a starting point.

Upvotes: 3

Related Questions