Python 如何在原子编辑器中隐藏 *pyc 文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24079976/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to hide *pyc files in atom editor
提问by andilabs
采纳答案by Lee
The method for hiding files that you do not want showing up in the Tree View (which is what most people mean when they ask this question) depends on whether or not you've added the files to your .gitignore
. If you have, then all you have to do is:
隐藏您不想在树视图中显示的文件的方法(这是大多数人问这个问题时的意思)取决于您是否已将文件添加到.gitignore
. 如果你有,那么你所要做的就是:
- Open Settings
- Scroll down the list on the left to find the
Tree View
package - Click on it to bring up the package-specific settings
- Ensure
Hide Vcs Ignored Files
is checked
- 打开设置
- 向下滚动左侧的列表以找到
Tree View
包裹 - 单击它以显示特定于包的设置
- 确保
Hide Vcs Ignored Files
被检查
If you want to hide certain files in the Tree View whether you have a Git project open or not:
如果您想在树视图中隐藏某些文件,无论您是否打开了 Git 项目:
- Open Settings
- Add the file mask to the comma-separated list under
Ignored Names
(add*.pyc
in your case) - Scroll down the list on the left to find the
Tree View
package - Click on it to bring up the package-specific settings
- Ensure
Hide Ignored Names
is checked
- 打开设置
- 将文件掩码添加到
Ignored Names
(*.pyc
在您的情况下添加)下的逗号分隔列表 - 向下滚动左侧的列表以找到
Tree View
包裹 - 单击它以显示特定于包的设置
- 确保
Hide Ignored Names
被检查
Also note that when you add a file mask to the list of Ignored Names that files matching that mask will not show up in other parts of Atom like the fuzzy-finder:find-file
(Cmd+Ton OS X and Ctrl+Ton Windows/Linux by default) command.
另请注意,当您将文件掩码添加到 Ignored Names 列表时,匹配该掩码的文件将不会显示在 Atom 的其他部分,如fuzzy-finder:find-file
(Cmd+T在 OS X 和Ctrl+TWindows/Linux 上默认)命令。
回答by andilabs
I found thiswhere it is said that you can toggle that in Preferences
->Tree View
->Hide Ignored Names
and Hide Vcs Ignored Files
.
我发现了这个,据说你可以在Preferences
-> Tree View
->Hide Ignored Names
和Hide Vcs Ignored Files
.
Edit:The files to hide you have to specify first in Preferences
->Settings
->Core Settings
->Ignored Names
. This was described here.
编辑:要隐藏的文件必须首先在Preferences
-> Settings
-> Core Settings
-> 中指定Ignored Names
。这是描述here。
Let me know if it works.
让我知道它是否有效。
回答by Kanan Rahimov
In Atom 1.25.0 on Ubuntu I found this setting Hide Vcs Ignored Filesunder packages configuration: Preferences -> Packages -> Tree View -> Settings.
在 Ubuntu 上的 Atom 1.25.0 中,我在包配置下找到了这个设置Hide Vcs Ignored Files: Preferences -> Packages -> Tree View -> Settings。
Also, pressing I
while Tree View activated also works for me (@Suraj Thapar's comment).
此外,I
在激活树视图时按下也适用于我(@Suraj Thapar 的评论)。
Please note, you have 2 options here: Ignore file by .gitignoreand ignore files by Hide Ignored Nameswhich refers to Ignored Namescore config settings.
请注意,这里有 2 个选项:通过.gitignore忽略文件和通过Hide Ignored Names忽略文件,它指的是Ignored Names核心配置设置。