How to? How to prevent filename completion for some file types?

May 20, 2009
303
5
58
ITALY
I would like to know if there is a way to prevent filename completion, for example to prevent type command on executable files. Something like "set filecompletion=cd:dirs; type:!exe". So that if I use the
command "type saver" and then I press the tab key, it finds "saver.log" but not "saver.exe".

Thank You and regards

Rodolfo Giovanninetti
 

rconn

Administrator
Staff member
May 14, 2008
12,557
167
I would like to know if there is a way to prevent filename completion, for example to prevent type command on executable files. Something like "set filecompletion=cd:dirs; type:!exe". So that if I use the command "type saver" and then I press the tab key, it finds "saver.log" but not "saver.exe".

Yes, by using "!exe".

However, you can't just tell it what not to match, you have to provide something *to* match. For example:

Code:
set filecompletion=type:!exe *

Which will match everything except exe's.
 
May 20, 2009
303
5
58
ITALY
Also, You might want to add this description, with a complete example, to the help, at least I could not find anything.


Thank You again and regards

Rodolfo Giovanninetti
 

Similar threads