• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
      • Introduction to CSPro Language
      • CSPro Program Structure
      • Programming Standards
      • Change Code Properties
      • Code Folding
      • Debugging CSPro Applications
      • Declaration Section
      • Procedural Sections
      • Logic
      • Language Elements
      • JavaScript Use in CSPro
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • CSPro Statements and Functions
    • Text Templates
    • Templated Reporting System
    • HTML, Markdown, and JavaScript Integration
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataManager>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

Code Folding

The CSPro logic editor supports code folding, a way to collapse and uncollapse sections of code. When working with large amounts of code, it may be useful to collapse ("fold") code to see an overview of the code, and then to uncollapse ("unfold") the code to see details about an implementation.
To modify code folding options, from the View menu, select Code Folding. The Level options allow you to control what is folded:
  • None: Turn off code folding.
  • Procedures and Functions: Fold procedures and user-defined functions.
  • All: In addition to procedures and functions, fold other block-like aspects of the language (e.g., do, if, forcase, recode, etc.).
The actions, all of which have shortcuts, are:
ActionShortcutDescription
Fold AllAlt + 0 (zero)Folds the entire document, collapsing all sections at the current fold level.
Unfold AllAlt + Shift + 0 (zero)Unfolds the entire document, uncollapsing all sections at the current fold level.
Toggle Current LevelCtrl + Alt + FToggles the current code fold level where the cursor is. That is, if the section is folded, it will be unfolded; if it is unfolded, it will be folded.