Assuming I have multiple files opened as buffers in Vim. The files have *.cpp
, *.h
and some are *.xml
. I want to close all the XML files w
TAB
will only autocomplete one file for you as of Vim 7.4.282
useto autocomplete all files.
You can just use:
bd filetype
then just use
to facilitate the completion of all open files of specified filetype.
for example, you have 1.xml, 2.xml, 3.xml, and 4.xml, you can do:
bd xml
then press
vim will autocomplete for you as follow:
bd 1.xml 2.xml 3.xml 4.xml
you can just press enter to complete the command.
if you have made changes in one of the files mentioned above, do remember to do:
bd! xml