Is it possible to get vim to open multiple files into tabs, similar to the way the args
command will open multiple files into buffers?
Doing something like :tabe ./*
results in the error "E77: Too many file names", even though the number of files is less than the value set in the tabpagemax
property.
(I believe the vim -p
option will open in tabs, but I'm hoping to find a way to do it when vim is already open.)
Answer
:tab all
will open all the files in Vim's argument list in individual tabs. The argument list is initially set to the list of file names given on the command line when Vim is started. The list may be changed with the :args
and related commands. See
:help :all
:help argument-list
Example:
:args *.c
:tab all
will open all the .c files in the current directory in individual tabs.
Comments
Post a Comment