contour
contour copied to clipboard
output folding
trafficstars
Add folding support to primary screen buffer. Folding can be triggered via CSI sequence extension.
- start fold: starts a new fold
- end fold: ends current fold (if any)
- restart fold: ends current fold (if any) and starts a new fold
Such a CSI sequence could be easily added to the prompt to have automatic command based folding.
Choose CSI carefully. (Avoid conflicts, make sure we can extend this in the future).
Following new input actions are required
- ScrollToPreviousFold - moves top viewport line one fold up in history
- ScrollToNextFold - moves top viewport line down one fold
- CollapseAllFolds - collapses all folds
- ExpandAllFolds - expands all folds
- CollapseLastFold - collapses last fold
- ToggleLastFold - toggles last fold between collapsed and expanded state
- ToggleFold - toggles current fold between collapsed and expanded state
Configuration entries
folding:
enabled: true
show_markers: true
auto_collapse_on_csi_restart: false