Topic Collapsible blocks in TIKE

We have two new locations for Keyman technical support:

The Tavultesoft Forums are now read only.


# Collapsible blocks in TIKE   2016-02-21 04:14:26.673
br Julian Griffin OSL
A request for Code Folding in TIKE.

   Sometimes this is enumerated by '+', '-' symbols to the right of line numbers to show or hide code blocks.

   One obvious choice for code folding would be Groups().
From where a Group is started ie Group(GroupName), {with or without 'Using Keys'} to where the compiler ends a Group could be folded / hidden. When folded, only the Group(GroupName) statement line would be visible.


   A second possibility for code folding would be an unbroken block of code, which has no empty lines. When folded, only the first line is visible. Comment lines, with or without text, would count as part of the unbroken block. eg
:
c Start of block 1
Group(MenuErrHandler)
   dk(a_err) > Outs(a_Menu)
   dk(c_err) > Outs(c_Menu)

c Start of block 2
c Double letter vowel markups.
c
c .  This is so that TPA construction will sort correctly.
   Any(aA) + $ArchKey > Context(1) $Arch_ Context(2)
   Any(eE) + $ArchKey > Context(1) $Arch_ Context(2)

Group(Block3)
   Store(BarKey)       "_"
   Store(ArchKey)      ")"
   Store(SilentKey)    "*"
But a block that is only comments would not be collapsible.


   A third possibility for code folding would be Bookmarks. Indeed Bookmarks would be very useful anyway.

   If a bookmark could be defined with '#BookmarkName' and ended with '^BookmarkName' this could be treated as a foldable block.
This method would also allow for nested blocks.

   If #BookmarkNames were also added to the 'Find' dialog, this would allow for fast navigation within the keyboard definition.

Regards
Julian Griffin

PS If Code Folding is not possible, then I would still like to make a heart felt plea for Bookmarks. :)
# RE: Collapsible blocks in TIKE   2016-02-22 07:42:39.943
Marc Durdin
Tavultesoft Staff
At this time code folding is not supported; it is possible but a fair bit of work.

However, numeric bookmarks are already supported. Press Ctrl+Shift+number to set or clear a bookmark, and Ctrl+number to jump to that bookmark. These bookmarks are only kept for the duration of the editing session.