简体   繁体   English

是否有相当于set wildignore用于忽略具有不可打印字符的文件?

[英]Is there an equivalent of set wildignore for ignoring files with nonprintable characters?

Currently I ignore certain file extensions, but I think it would be quite useful if I could have vim ignore binary files (where we might define binary as files with nonprintable characters) when doing tab completion. 目前我忽略了某些文件扩展名,但我认为如果我可以让vim忽略二进制文件(我们可能将二进制文件定义为具有不可打印字符的文件)在执行选项卡完成时非常有用。

I am running on Linux rather than windows, so just matching .exe is not useful. 我在Linux而不是Windows上运行,所以只匹配.exe是没用的。

No, there's no such setting, and I also don't see how it could be useful. 不,没有这样的设置,我也看不出它是如何有用的。 Especially on Unix, many files with the executable bit set are actually scripts (Shell, Perl, Python, etc.), which are perfectly suitable for editing with Vim. 特别是在Unix上,许多带有可执行位集的文件实际上是脚本(Shell,Perl,Python等),非常适合用Vim编辑。

For custom :command s, you could build such a completion yourself ( -complete=custom argument, using executable() for testing), but to apply this to built-in commands, you'd have to patch Vim's source code. 对于custom :command ,您可以自己构建这样的完成( -complete=custom参数,使用executable()进行测试),但要将其应用于内置命令,您必须修补Vim的源代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM