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

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
May 20, 2009
218
0
53
ITALY
#1
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
10,165
86
#2
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
218
0
53
ITALY
#4
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