Skip to content
Use globbing patterns for :edit, :tabedit, etc.
Branch: master
Clone or download
arp242 Add fnamescape() around filename
Otherwise it will break for files with e.g. spaces.
Latest commit e2f3be7 Sep 29, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc Update docs Feb 18, 2017
plugin Add fnamescape() around filename Sep 29, 2017
LICENSE Fix type; add license file Jul 26, 2017
README.markdown Fix type; add license file Jul 26, 2017

README.markdown

This project is considered finished

Add variants of :edit and friends that can take a globbing pattern to open multiple files:

:Edit plugin/*.vim doc/*.doc
:Split ??_*.c

See :help wildcards for a overview of the globbing patterns interpreted by Vim.

Compare this to the default behaviour of :edit *.vim, which will either:

  • open a file named *.vim if there are no matches;
  • open the file if there is exactly one match;
  • error out with E77: Too many file names if there are more than one matches.

Based on my answer here, which also lists some other solutions.

By default it'll map :Edit, :Tabedit, :Split, and :Vsplit. You can use :cabbr tabe Tabe etc. to use it automatically.

See :help globedit for the full documentation.

You can’t perform that action at this time.