How can I hide the globe in vim?

I am trying to populate a vml arglist with all the file names in a directory that does not contain a "matcher". I can fill it with file names that include a match using

args *matcher* 

Is there an easy way to undo glob to get all files that don't match?

+7
source share
2 answers

The only way I know is this:

 :args * | silent! argdelete *matcher* 

The silent! part silent! needed to omit the No match error.

Refresh. You can also create a convenient command for entering smaller keys:

 :command! -nargs=* Args args * | silent! argdelete <args> 

And use it as follows:

 :Args *matcher* 
+8
source

The xaizek team is short and smart; unfortunately, it only applies to argument files from the current directory. I expanded this to work with any directory, and linked it to other useful commands for processing arguments in my ArgsAndMore plugin .

+1
source

All Articles