This plugin adds code folding support to gedit 3.x. It supports several (meaning more than 1) languages. Note that this plugin is not compatible with gedit 2.x.
Besides folding indivudual blocks by clicking the respective block start markers on the left margin, two other operations are supported either from the Tools menu or from the keyboard like this
- Alt+Shift+T: Toggle all blocks
- Alt+Shift+C: Fold current block
- C/C++
- CSS
- Graphviz Dot
- Java
- Javascript
- JSON
- Lua
- Objective-C
- Perl
- Prolog
- R
- Ruby
- sh
- Scheme
- SQL
- XML
Copy both the files from the src directory of this repo & place in .local/share/gedit/plugins directory.
Please note that most of the exmaple code in the screenshots are taken from the public domain. I apologize if I am not respecting someone's copyright here.
- Code folding is dependent on properly formatted blocks of code. If the folding behaves erratic try reformatting the code
- A simple way of reformatting to facilitate folding is to have block start and end constructs in seperate individual lines
- A light color scheme works best (actually dark schemes don't show the markers at all) with this plugin, for now
Permission to copy, use, modify, sell and distribute this software is granted.
This software is provided "as is" without express or implied warranty, and with no claim as to its suitability
for any purpose.

