问题标签 [code-folding]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
8673 浏览

python - 如何让 pyCharm 停止隐藏(展开)我的 Python 导入?

每次我打开 Python 文件时,PyCharm 都会隐藏所有导入并显示:

在编辑器内。

我必须手动展开它才能看到导入。我在哪里可以找到撤消import语句自动隐藏的设置?

0 投票
1 回答
50 浏览

visual-studio-2012 - 在 VS2012 中折叠 Razor 注释

我在 .cshtml 文件中有大量代码,这些代码使用以下语法进行了注释。

但 Visual Studio 不显示此块的代码折叠选项。有没有办法这样做?

0 投票
1 回答
721 浏览

netbeans - Netbeans 8.0 - 代码折叠的首选项

我最近切换到将 Netbeans IDE 8.0 用于 PHP 项目,并想知道是否有可能:-

  1. 配置 NetBeans 以在我保存文件时记住我的代码折叠状态(打开/关闭)
  2. 启动时仅自动折叠功能。

非常感谢期待。

菲尔

0 投票
3 回答
1013 浏览

visual-studio-2013 - 折叠到定义在 VS2013 和 ReSharper 8.2 中不起作用

我正在运行 VS2013 Pro Update 2 和 R# 8.2,但我无法将代码折叠到定义中。在我的工作机器和家庭工作站上都​​是如此。当我单击折叠到定义时,using语句折叠,但仅此而已。我的光标在代码中的位置并不重要。在工作中,我的操作系统是 Windows 7;在家里是 Windows 8.1。

我对 VS 2012 Pro 和 R# 8 没有任何问题。这是 VS2013 独有的。

有没有其他人遇到过这个问题并解决了?谷歌没有显示任何有希望的东西......

0 投票
1 回答
120 浏览

java - 如何从 StyledText 中获取所有折叠线

在我的 Eclipse 插件中,我有一个StyledText对象和IEditorReference对象。我还有一个 yCoordinate,我想用它来检查哪个行号低于这个坐标:

如果没有应用线折叠,这可以正常工作。因此,我正在寻找一种将折线考虑在内的方法,或者将所有折线归还给我,以便我可以手动调整lineIndex. 我有哪些选择?

0 投票
1 回答
823 浏览

delphi - How do I keep Delphi from automatically expanding folded code regions?

I widely use {$Regions} in my units, but sometimes the VCL editor takes annoying decisions to automatically expand all regions. Is there any way to tell the editor not to expand regions that are collapsed unless I explicity do this by clicking on the + button?


Update from comments:

Unfolding occurs,

  1. with nested procs/funcs. Introducing a new nested "procedure" header. As soon as you type the 'p' character, all other nested procs/funcs are unfolded. This occurss also if, for instance, by mistake, you delete the "end" of any nested proc/func (or anything of the kind).
  2. with regions. If you start a comment with "{", the Region immediately below is unfolded. Starting a comment with "(*" provoques all Regions below to be unfolded and same applies to all procs/funcs under those Regions.
0 投票
1 回答
548 浏览

swift - 在 Xcode 中使用 Swift 时有什么方法可以折叠注释?

使用 Objective-C 可以折叠多行注释。这似乎不适用于 swift 文件。有没有办法在 XCode 中启用它?

0 投票
1 回答
222 浏览

php - 如何在 Aptana Studio 3 的代码折叠功能中“全部展开”

在 Aptana Studio 3 中,我注意到您可以执行以下操作。

右键单击文档中的某些代码 > 命令 > 源代码 > 折叠 > 在级别切换折叠 > 所有级别

但是,我不想切换折叠,而是希望明确确保所有级别都已展开(无论它们的初始状态是什么)。

怎么可能告诉 Aptana 以某种方式删除代码折叠并只是“扩展所有级别”?

0 投票
2 回答
223 浏览

java - Eclipse Juno 彩色代码折叠区域

最近我开始在 Eclipse 中遇到彩色代码折叠问题。我想消除日食中的彩色区域,只使用白色背景。

在此处输入图像描述

如果有人可以帮助我摆脱盒子和绿色背景,我将不胜感激。

编辑:发现这不是 Java 特定的问题。当我打开 javascript 文件时,也会发生同样的事情。

在此处输入图像描述

0 投票
0 回答
42 浏览

javascript - 冷折叠在 javascript 的 netbean 中不起作用

我最近转移到 Ubuntu 并下载了 Netbean IDE 8.0。我有一个包含 javascript、CSS 和 HTML 的大型 html 文件。我去工具->选项->编辑器->折叠并为所有语言启用代码折叠。我什至重新启动了netbean,但代码折叠不起作用。如何使工作?谢谢