php 如何让 PHPStorm 折叠打开文件中的所有方法/函数?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33442286/
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 make PHPStorm collapsing all methods/functions on file open?
提问by Dmitry K.
采纳答案by Dmitry K.
回答by Andrew
This works for me: CTRL SHIFT numpad -
这对我有用:CTRL SHIFT 数字键盘 -
It also collapses the class... but then just manually re-open the class by clicking the + and the methods are folded.
它还会折叠类...但只需通过单击 + 手动重新打开类,方法就会折叠起来。
And then you can re-open all methods with CTRL SHIFT numpad +
然后您可以使用CTRL SHIFT 小键盘 +重新打开所有方法
https://www.jetbrains.com/help/phpstorm/code-folding-commands.html
https://www.jetbrains.com/help/phpstorm/code-folding-commands.html
回答by Colin
You don't need to change anything in the settings like Dmitry suggested.
您不需要像 Dmitry 建议的那样更改设置中的任何内容。
Simply do ??? *1-- That's OPTION+CMD+NumPad *, then 1.
简单地做??? *1——那就是 OPTION+CMD+NumPad *,然后是 1。
If you're on Windows, it's CTRL+SHIFT+NumPad *, then 1.
如果您使用的是 Windows,则是 CTRL+SHIFT+NumPad *,然后是 1。
回答by sh6210
I'm using ubuntu,
我用的是ubuntu
the command is
命令是
-> CTL, SHIFT and MINUS( this will collapse the whole class including all methods)
-> CTL、SHIFT 和 MINUS(这将折叠整个类,包括所有方法)
-> CTL, PLUS( will expand the classbut all methods should be collapsed )
-> CTL,PLUS(将扩展类,但所有方法都应折叠)
-> CTL, SHIFT and PLUS( will expand the whole class including all methods)
-> CTL、SHIFT 和 PLUS(将扩展整个类,包括所有方法)