Questions tagged [code-folding]

Code folding is a feature of some text editors that allows one to ‘fold’ (collapse/hide) and ‘unfold’ (expand/reveal) large blocks of code.

Code folding is a feature of some text editors that allows one to ‘fold’ and ‘unfold’ large blocks of code. This can be helpful to see a quick overview of a source file:

A C source file with two collapsed (‘folded’) functions, <code>greet</code> and <code>main</code>. The body of the functions are not visible.

However, folds can be expanded to work on a particular part of a file:

The same file as above, but with the definition of <code>main</code> unfolded.

In some editors, folding is indicated by a disclosure triangle in the line number area:

I lied; there are no line numbers. However, in the pane where the line numbers *would* be, there are three triangles: two to collapse the unfolded <code>greet</code> function, and another, in orange, to expand/unfold the folded <code>main</code> function.

Resources

205 questions
0
votes
2 answers

Code-Folding Code on RichTextBox using TreeView

I'm currently developing an IDE and Im working on Code-Folding codes now . I'm thinking to use a TreeView as for it has a collapse and expand property but i dunno/not sure how can I implement it on RichTextBox . Even an Initial Code showing if…
Elegiac
  • 129
  • 1
  • 17
0
votes
1 answer

Xcode save code folding?

I know it's not directly related to programming, but what better place then stackoverflow right? So code folding is an awesome feature which I love, but does anyone know if there is a way to get Xcode to remember where you have certain sections…
tybro0103
  • 48,327
  • 33
  • 144
  • 170
0
votes
1 answer

IDE to expand and collapse JavaScript code blocks

I find it difficult to code in JavaScript when there are so many nested functions or objects within one another that it makes it difficult to modify your code without breaking it. What IDE can be used to expand and collapse code blocks (or lexical…
JustBeingHelpful
  • 18,332
  • 38
  • 160
  • 245
0
votes
1 answer

Coffe Bytes Java Folding

I recently downloaded Coffe Bytes for Eclipse Juno and followed this tutorial to install How to use Coffee-Bytes code folding but when I do somthing like the following // {{ fold block public static void stuffToFold() { return 4; } // }} It does…
Jordan Trainor
  • 2,410
  • 5
  • 21
  • 23
0
votes
2 answers

Eclipse folding with java

Working with eclipse in a java collapsed file if i try to write a method between two collapsed methods when I write public and press space automatically the ide collapses the word public inside the method below. State initial - public methodA() …
user1151835
0
votes
1 answer

Zend Studio 9 - Code folding

Is there any trick to collapse one portion of code in Zend Studio 9? I can collapse functions and/or classes, but there is no support for "if statements" folding nor selection.
-1
votes
3 answers

VSCode Code folding Error

After I update Visual Studio Code to the latest version (version 1.22, refer: Release Note for Visual Studio Code 1.22), the code folding does not work. It looks like the folding does not work for else if statement. Here is what I mean: no folding…
李仕臣
  • 11
  • 1
  • 2
-1
votes
1 answer

Folding Comments that are inside Methods

I have comments inside methods as onCreate method for example and I need to collapse them to see the code more simpler and better Any ideas about how to do that, all my searching results led me to just do this out of methods not in Out and In are…
Dasser Basyouni
  • 3,142
  • 5
  • 26
  • 50
-1
votes
1 answer

Make functions with line break in their first line fold in Vim

I am using foldmethod=syntax in my .vimrc file. It works well with C functions like this one: int some_fun(int i) { return i; } However, it won't work with functions, which have a break line in the first line: int some_fun2(int i, int i2) { …
anon
-2
votes
1 answer

Will Java 9 introduce a standard for code folding?

I was reading about Java 9 new features, modules and changes. So far so good. Will Java 9 introduce a standard for code folding? Something similar to #region in VisualStudio or NetBeans' code folding comments. [-] //
Alessandro Da Rugna
  • 4,571
  • 20
  • 40
  • 64
1 2 3
13
14