5

I am using Vim 7.3 for no particularly compelling reason on an old system I am forced to work on. It's an internal system and it will eventually be replaced by a more modern version of the same distro.

Now when I start editing in a folder with 13 files, using vim -p *, I end up seeing 10 of those in tabs, but three of them remain "hidden" (i.e. as ordinary buffers). When I go through these tabs one by one, I get - after closing the 10 tabs - the following message:

E173: 3 more files to edit

... is there a way with -p to force all files into a tab (the horizontal terminal estate is more than enough to fit them) or is there a way to move the remaining buffers into separate tabs once I hit the above message?

6

The documentation for this feature can be found at :help -p:

Open N tab pages. If [N] is not given, one tab page is opened for every file given as argument. The maximum is set with 'tabpagemax' pages (default 10).

(emphasis mine)

So to increase the number of tab pages, add a line to your .vimrc, e.g.:

set tabpagemax=20

If you don't want to change the default in your .vimrc, you can add it to your vim invocation. However, the setting is changed too late to affect the initial set of tab pages, so you also need to open tabs for the extra files using :tab all:

vim -c 'set tabpagemax=20' -c 'tab all' -p *

I tested this in Vim 7.4, but as far as I can tell from :help version7.txt, the 'tabpagemax' setting existed as of the introduction of tab pages in Vim 7.0.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.