2

I want to set up vim so that it opens automatically in tab and not in buffers. I know that I could use alias gvim='gvim -p' or some such shell mapping but I am wondering if there is a way to do that from vim itself.

So, what I want is for

gvim ook eek monkey

to be equivalent in behaviour to

gvim -p ook eek monkey

aka a tab is opened for each file/buffer.

1 Answer 1

1

See :tabnew and :tabedit in :help tabpage. (I'm not sure if you can (or want to) re-map :edit)

(Edit There is a related and helpful SO discussion)

(Edit to match your refined question) I doubt it will be less hassle than alias gvim=gvim -p, but using autocmd (and some Vimscript, everything in your .vimrc) this might be possible. (But I'm not knowledgeable enough to go into detail with this.)

1
  • Sorry, could not see how to set gvim behaviour to open multiple tabs if there is more than one filename on the command line. Edited question to make it more clear. Commented Dec 15, 2011 at 14:45

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.