Mohit Verma
Mohit Verma

Reputation: 1660

Collapsable code in gedit

How to collapse a function , class , or method in gedit. i managed to install all plugins for gedit , but unable to find any plugin for the same.

Upvotes: 9

Views: 8071

Answers (3)

aeischeid
aeischeid

Reputation: 576

In gedit 3 I am currently am using my own fork of the plugin others have mentioned. It is not perfect, but it works fairly well for me anyway. https://github.com/aeischeid/gedit-folding

Upvotes: 9

Zecc
Zecc

Reputation: 4350

I just found this updated version of gedit-folding:
http://code.google.com/p/gedit-folding/issues/detail?id=4

Just download folding.py and folding.gedit-plugin and save them to ~/.local/share/gedit/plugins then enable "Simple Folding" under Edit>Preferences>Plugins.

To use, move to the very beginning of a block and press Alt+Z. I've given it a quick test with Python, Javascript and HTML files and it seemed to collapse most blocks, with the notable exception of multiline strings and comments.

It isn't perfect, but it's better than nothing, I guess.

Update: I've just tested it with badly indented code. The folding seems to be based on indentation only.

Upvotes: 1

phschoen
phschoen

Reputation: 2081

for ubuntu 10.04 works this folding plugin:

http://code.google.com/p/gedit-folding/downloads/list

install it for the user by placing it at

~/.gnome2/gedit/plugins/

or for the system

/usr/lib/gedit-2/plugins/

Upvotes: 0

Related Questions