ralpha_fold() and ralpha_unfold() allow usage of the R.AlphA code format that keeps long scripts easily readable.
This format is based on identifying code parts with brackets, and an optional but recommended comment at the end :
{
...
code from part 1
...
} # part 1
{
...
} # part 2
then appearing as
{...} # part 1
{...} # part 2
To stay easy to manipulate, this format requires shortcuts to easily open or close the different sections.
ralpha_fold() will fold the different code parts and go back to beginning of current part
ralpha_unfold() will unfold a code part and jump to the next braces when relevant.
both combined will provide a convenient way to manage what is displayed on screen, ensuring a constant global overview of the document.
Shortcuts required: Here are the suggested shortcuts, both for Mac and Windows :
ralpha_fold : use ctrl+up
ralpha_unfold : use ctrl+down
ralpha_unfold()NULL (invisibly). This function performs actions only (cursor movement and unfolding)