This is an old revision of the document!


HowTos

Adding Manual or Custom Fold Points

Experienced programmers know the importance of organising our work into functions, routines and even separate 'include' files. However, there are still times when we have to write code that runs into several pages.

Geany will automatically offer fold points to sequences of comments and to functions. It can also be very useful if we can manually organise our work into sections.

To add a custom fold-point, the syntax can vary, depending on the language being used. There is a list in the Scintilla docs, here:

http://www.scintilla.org/SciTEDoc.html (do a page search for 'FB' , it's about halfway down the page, no index-link unfortunately)

Remember Geany uses the good work from the Scintilla project as its foundations.

Try the 'Numbered Bookmarks' plugin. This has an option to 'save the fold state'.

#!/bin/bash

{ #FB section title

# this works
# code here

}


;{(FB) 
# Ex Scintilla docs example but does NOT work
# in 'sh' as the ;'s won't parse
;} 


You may need to experiment a little …

Print/export