简体   繁体   中英

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.

I am running on Linux rather than windows, so just matching .exe is not useful.

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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