Could somebody please enlighten me on how to configure CandyFolds?
I'd like to know all the commands that can be entered in the 'Regular' expression fields.
For example how to configure CandyFolds for an IF-ELSE statement. Or DO-END.
The default mode doesn't display the folds as I would like it to.
sorry... I was not monitoring this thread. If you are still out there, let me know and I will try to help you.
Yes. i have the same question. Could you pls provide a few examples?
Here goes some instructions on how to configure CandyFolds for a given edit mode.
Assuming that you already installed the CandyFolds plugin, let's see how to configure it to show different colors for the fold guides in the html edit mode:
1. First, we need an indented HTML file to play with. Open http://www.jedit.org with your web browser and save to a file named jeditHome.html . Then open jeditHome.html with JEdit.
2. Change the folding mode of the current buffer (jeditHome.html) to "indent":
(a) Open the Buffer Options dialog using the menu Utilities->Buffer Options.
(b) Change the "Folding mode" to "indent".
(c) Click "OK" and JEdit now setup folds using the indentation.
3. The CandyFolds plugin draws light blue fold guides by default. If there are not fold guides visible then something is wrong (is the CandyFolds plugin installed and enabled?).
4. Now let's see how to change the default fold guides color to green:
(a) Open Plugin Options dialog using the menu Plugin->Plugin Options.
(b) Select the CandyFolds plugin.
(c) Change the "Mode" to "DEFAULT" (the first item of the list).
(d) There is now a table showing a single row. Click the color cell and select any green color using the color selector. You can also change the "Alpha" value to 255 to get an opaque green.
(e) Click "OK" on the color selector dialog. Now the cell shows the desired green color. Press "OK" on the Plugin Options dialog and see how CandyFolds draws the guides using the new color.
5. Now let's configure CandyFolds to show a yellow color every time a fold begins with a line containing "<td" in html edit mode.
(c) Change "Mode" to "html" (if it is not already selected ;) and deselect "Use only DEFAULT Configuration".
(d) Press the "+" button to insert a new color guide configuration row.
(e) Click the color cell and select the yellow color you prefer.
(f) Click on the "Name" cell and change it to a meaningful name: "td".
(g) Click on the "Regular Expression" cell and change it to the regular expression ".*<td.*" which matches any line containing "<td".
(h) Click on another cell, so that the new value for "Regular Expression" is actually saved (this is an annoying bug I will fix in a future release).
(i) Click "OK". Now CandyFolds uses the selected yellow color on folds which begin with a line containing "<td".
6. If you want another color guide configuration, just follow the previous step using your new desired criteria for the new color guide configuration row.
Keep in mind that Candyfolds uses the color guide configurations defined for the editing mode and applies them in order (top to bottom) until one matches, if there is no match then it uses the DEFAULT configuration. You can change the order selecting the color guide configuration row and then using the up/down arrows.
You can also disable CandyFolds for any mode deselecting "Enable CandyFolds for this Mode".
Notice that the java edit mode comes with some predefined color guide configurations.
By default JEdit does not create folds on html files (we had to change the folding mode to "indented"). You can change the default folding mode for an edit mode through the Utilities->Global Options dialog (jEdit-Editing node). CandyFolds needs folds to apply the color guides.
Let me know if you have questions or comments.
Hi Nicolas, thanks for the info. I'll give it a go. I'm sure to come back with further questions! thanks for making this available.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.