Repository navigation
Releases
Releases · nickolaij94/obsidian-mainframe-code
1.1.0
Layout preview for COBOL
Add preview to a COBOL block's fence (```cobol preview) and a panel under the block shows the printed report lines, built from the program's data definitions — no compiler needed.
- Each record shows its name, length in bytes, a column ruler and its lines; edited numbers get sample values that show zero suppression and signs.
- A
```cobol-sampleblock right after it gives your own test values, one row per printed line. - Choose records with
```cobol preview=HEADING-1,DETAIL-LINE. - Follows IBM Enterprise COBOL editing rules, and warns instead of guessing.
- Works in Reading view, Live Preview and Source mode, including blocks inside callouts and blockquotes, and updates as you type.
See the README's Layout preview section for details.
Other changes
- Optional ISPF-style column ruler above COBOL and JCL blocks.
- The preview limits its own work, so even a very large or unusual block can't slow Obsidian down.
- Now requires Obsidian 1.13.1 or later.
1.0.0
First release of Mainframe Code Blocks: syntax highlighting and column guides for COBOL and JCL code blocks, the same in Reading view, Live Preview and Source mode.
Features
- Column guides at the fixed-format columns: COBOL after 6, 7, 11 and 72; JCL after 2, 10, 16, 71 and 72.
- COBOL highlighting: keywords, numbers and strings; dimmed sequence numbers (1–6) and identification area (73–80);
*and/comment lines;-continuation andDdebugging lines; continued literals end at column 72. - JCL highlighting: names,
JOB/EXEC/DDand other statements,IF/THEN/ELSE/ENDIF, parameters,&SYMBOLS.and&&TEMPdatasets, comments, in-stream data afterDD *andDD DATA(withDLM=), continuations and JES2 statements. - Columns stay put: fixed-format lines never wrap. In narrow windows the font shrinks so all 80 columns fit.
- Free-format COBOL with
```cobol-free(colours, no columns). - Fence names:
cobol,cbl,cob,cpy,cobol-free,jcl, plus your own in settings. - Settings: guides per language, guide strength and colour, shrink to fit and smallest font size.
- Uses your theme's code colours, in light and dark mode.
Requirements
Obsidian 1.13 or later. No network access; desktop and mobile.
Known issues
- Not yet tested on a phone or tablet. Please open an issue if something looks wrong there.
- Very large JCL blocks (thousands of lines) may make typing slower.
- In Source mode, code blocks inside callouts are not highlighted.
Installation
Until the plugin is in the Community plugins directory, download main.js, manifest.json and styles.css below into <your vault>/.obsidian/plugins/mainframe-code-blocks/, then enable Mainframe Code Blocks in Settings → Community plugins.