Godot: expand/collapse code chunks in script editor

Created on 5 Nov 2015  Â·  22Comments  Â·  Source: godotengine/godot

It might be useful to be able to expand/collapse code branches by editor.

feature proposal editor

Most helpful comment

What do you think about this:
image

  • group for scripts and help files
  • x for closing file
  • collapse and uncollapse to show script function (override and new)
  • script icon changed

All 22 comments

+1, code folding would be awesome.

:+1:

i can't think of a way to program this that is not a mess, so contributions
welcome :D

On Sat, Dec 5, 2015 at 1:15 PM, Bojidar Marinov [email protected]
wrote:

[image: :+1:]

—
Reply to this email directly or view it on GitHub
https://github.com/godotengine/godot/issues/2732#issuecomment-162217652.

:+1:

YES! I want this as well!

Bump! My scripts are long and unwieldy. Code folding would be a huge boon.

code folding is a lot of work... but How about a function navigator for
now? (list of functions) in a sub-panel?

On Tue, Feb 23, 2016 at 3:06 PM, Kirill Edelman [email protected]
wrote:

Bump! My scripts are long and unwieldy. Code folding would be a huge boon.

—
Reply to this email directly or view it on GitHub
https://github.com/godotengine/godot/issues/2732#issuecomment-187820571.

@reduz yes please!!! :D

In my opinion, list of functions in a sub - panel it is still a useful thing

:+1:, we can have a pane at the right side of the code editor containing a list of functions and methods.

But please, make it hideable/configurable...

But please, make it hideable/configurable...

Indeed, it could have three states:

  • Disabled
  • Shown at left
  • Shown at right (default, probably)

May I make a suggestion:
suggestion

@kirilledelman Great proposal IMO.

Folks, please think twice before choosing how to implement this.
Most of the time you use this feature to jump to a function. You dont really need to have the info of all available functions on the screen all the time. For people like me who need to save on screen space, its really painful to have yet another side panel!

I would suggest implementing it the way others IDEs do: an horizontal combo box, that just lists the functions when you click on it, and jumps to it when you select one. Maximum utility, easy to use, and minium space occupied!

If you really want a panel, then I'd go for @kirilledelman suggestion as at least it uses horizontal space that is already occupied.

Most of these suggestions seem to have little benefit over Ctrl+Shift+F (or Search→Goto Function), but @nunodonato's IDE-like suggestion sounds okay

Wasting screen space to show a list of every script function all the time is not a good idea, and I need the space on left side list for script and help files

Collapse and uncollapse code would make most sense, but it seems the
hardest to implement
On 24 Feb 2016 19:46, "eska014" [email protected] wrote:

Most of these suggestions seem to have little benefit over Ctrl+Shift+F
(or Search→Goto Function), but @nunodonato's IDE-like suggestion sounds okay

Wasting screen space to show a list of every script function all the time
is not a good idea, and I need the space on left side list for script and
help files

—
Reply to this email directly or view it on GitHub.

What do you think about this:
image

  • group for scripts and help files
  • x for closing file
  • collapse and uncollapse to show script function (override and new)
  • script icon changed

that is pretty cool, but I will miss the icons the show what is a script and what is a help file.

I think you don't need it because is a group. No more mixing.
All scripts stay together.

I changed the picture to be more clear.

I think the idea of puppetmaster it is great

I'd like this but simplified. Simply a little arrow that you can open or close (or a + or -).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bojidar-bg picture bojidar-bg  Â·  3Comments

testman42 picture testman42  Â·  3Comments

ducdetronquito picture ducdetronquito  Â·  3Comments

n-pigeon picture n-pigeon  Â·  3Comments

Zylann picture Zylann  Â·  3Comments