6 Editor Support
The shrubbery package includes support for shrubbery syntax coloring and editor operations for DrRacket. Where possible, this section also provides hints for using other editors.
6.1 Shrubbery Support in DrRacket
Tab cycles through the possible indentations for a line based on preceding lines. The indentation possibilities can be different if a line is empty or starts with | or an operator. If multiple lines are selected, if they start out with a valid indentation relative to that first line, and if all lines can be shifted by the same amount in tandem with the first line, then Tab cycles through possibilities for the first selected line and shifts remaining lines by same amount; otherwise, Tab attempts to indent each line independently.
Meta-A toggles the armor of the currently selected region. Armoring adds «…» to make the selected region indentation-insensitive, and unarmoring removes the added «…». A potential use of armoring is to protect a region of code while moving it from one context to another context with a different indentation: armor in the source context, copy and reindent with Tab in the target context, and then unarmor.
6.2 How to Type «…»
The way to type «…» on a keyboard depends on your operating system, program editor, and configuration, but here are some possibilities:
DrRacket: Type \guillemetleft for « or \guillemetright for », then hit Control-\ or Meta-\ (where a Meta key combination is an Alt combination, Option combination, or Esc prefix, depending on your keyboard and configuration). Note that \gui followed by Control-\ or Meta-\ expands to \guillemet via autocomplete, and then l or r followed by Ctl-\ or Meta-\ again will complete to « or ».
Mac OS with an English keyboard layout: Hit Option-\ for «, or hit Option-Shift-| for ».
Windows: Hold Alt while typing 174 on the numpad for «, or hold Alt and type 175 on the numpad for ».
Unix variants with a typical window manager: Hit Control-Shift-U, then type 00AB (or just AB) for «, or type 00BB (or just BB) for », then hit Enter or Space.
Unix variants with a Compose key configured: Hit Compose, then type << for « or >> for ».
Vim: Type Control-K then << for « or >> for ».
Emacs: Run insert-char (via Control-X, 8, Enter), then provide 00AB (or just AB) for «, or provide 00BB (or just BB) for ».
See also the Keyboard entry section of the Guillemet article on Wikipedia.