Visual Studio Code - Automatic exclude based on .gitignore

天涯浪子 提交于 2019-12-04 13:13:35

问题


I'd like VSCode to automatically exclude files/folders based on my .gitignore configuration.

For the explorer exclusion I've found an extension (explorer-excluded-files which manages the files.exclude setting), but for the quick open file (cmd + p) I didn't find anything.

I guess I can try and tweak other *.exclude settings but I wonder why isn't there a global method to exclude .gitignore entries in all relevant places? Otherwise I have to manually sync the settings every time .gitignore changes.


回答1:


Regarding the explorer, in addition of the existing plugin you have found, there is a request in progress: Microsoft/vscode issue 38878

But regarding Quick Open, issue 41495 includes the comment:

Are those files covered by a gitignore pattern?
It now skips gitignored files by default.
You can disable this with "search.useIgnoreFiles": false if you prefer.

So are you using (with a current 2018 version of VSCode) the setting search.useIgnoreFiles?



来源:https://stackoverflow.com/questions/40452848/visual-studio-code-automatic-exclude-based-on-gitignore

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!