Aptana Studio:代码折叠不被记住
我已经开始使用 Aptana Studio 3 和一个大的 JS 文档。对我来说非常重要的是,代码被折叠以使文档更易于管理。不幸的是,我不断发现文档的折叠部分由于某种原因而展开,并且当我关闭并重新打开文档时,折叠部分不再被记住。
有没有办法让 Aptana 中的代码折叠更加永久?
I have started using Aptana Studio 3 with a big JS document. It is quite importnt to me that code is folded to make the document more manageable. Unfortunately I keep finding that folded parts of the document become unfolded for some reason and that when I close and reopen a document the folds are no longer remembered.
Is there a way to make code folds more permanent in Aptana?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我还没有找到一种方法来使代码折叠持久,但很想知道与此同时
,我一直在使用“全部折叠”选项与书签相结合。
当您打开文件时,您可以右键单击左边距,然后选择折叠全部(或 CTRL+SHIFT+小键盘除法) - 如果处理代码块,您也可以通过右键单击左边距,然后从书签中附加书签查看当您双击书签时,它只会展开该代码块并将您带到它
要在底部窗格中打开书签视图:
Window >显示视图>其他>一般>书签
I've not found a way to make code folds persistent but would love to know though
In the meantime I've been using the "collapse all" option combined with bookmarks.
When you open a file you can right click in the left margin and choose to collapse all (or CTRL+SHIFT+numpad divide) - If working on a code block you can attach a Bookmark also by right clicking in left margin, then from Bookmarks View when you double click the bookmark it expands just that code block and takes you to it
To open Bookmarks View in bottom pane:
Window > Show View > Other > General > Bookmarks
这里可能存在两个问题:
1)如果代码处于错误状态(即文档格式错误),则代码将展开。我们做了一些工作来防止这种情况一直发生,但是如果您经常遇到某个特定的用例,我建议您提交一个有关它的错误,以便开发人员可以查看。
2)打开/关闭编辑器时不会保存特定的代码折叠。但是,您可能有兴趣知道,在 3.0.2 版本中,代码块的初始折叠将是可配置的,因此您可以将某些项目设置为折叠时自动启动。
There may be two issues at work here:
1) Code will unfold if it's in an error state (i.e. the document is malformed). There was some work done to prevent this from happening all the time, but if there is a particular use case you run into often, I'd suggest filing a bug about it so that the developers can take a look.
2) Particular code folds are not saved across open/closes of editors. However, you may be interested to know that in version 3.0.2, initial folding of code blocks will be configurable, so you can set some items to auto-start as folded.