IBM i: RDi Colors
Color your IBM i sources in VS Code the way the IBM Rational Developer for i (RDi) editor does, on top of VS Code's Dark Modern theme.
Leer en español
Screenshots
RPGLE, fixed format

SQLRPGLE, free format

Display file (DSPF)

Physical file (PF)

RPG III (RPG/400)

CL

All screenshots are taken from the sample sources in the samples folder of the repository.
Features
Dark Modern RDi color theme: VS Code's Dark Modern theme with RDi colors for IBM i sources. Every other language looks exactly as in Dark Modern.
- Column-aware coloring rules that complement the grammars of the IBM i Languages extension, so that things RDi colors differently are told apart:
- DDS (PF, LF, DSPF, PRTF): record and field names, conditioning indicators (the
N apart from the number), values inside keywords, the A on comment lines.
- RPGLE / SQLRPGLE free format: flow control opcodes (
if, dow, exsr...) apart from the rest, the whole exec sql ... ; block, parentheses and semicolons.
- RPGLE fixed format: factor 1, factor 2, result field, length and indicators of C specs; extended factor 2 (
IF, EVAL...); D, F, H and O specs.
- RPG III (RPG/400): the same C spec columns, plus F and I specs and
/COPY.
- CL: programming commands (underlined),
%SST-style built-ins, operators, nested commands (THEN(GOTO ...), CMD(CALL ...)), labels.
- Turns off bracket pair colorization for these languages, so parentheses get the RDi color.
Requirements
- The IBM i Languages extension (
barrettotte.ibmi-languages). It is installed automatically as a dependency.
Usage
- Install the extension.
- Press
Ctrl+K Ctrl+T (or run Preferences: Color Theme) and pick Dark Modern RDi.
Main colors
| Element |
Color |
| Comments |
salmon #FFADAD |
| Specification letter, DDS names, opcodes |
cyan #2EFFFF / light cyan #ADFFFF |
| RPGLE control opcodes (in RPG III all opcodes are cyan), DDS keywords, RPG operators |
green #ADFFAD |
Lengths, numbers, %xxx built-ins |
yellow #FFFF2E |
| Literals, data types |
pink #FFADFF |
| Indicators |
bright green #2EFF2E |
Special values *xxx |
lilac #ADADFF (RPG) / green (CL, DDS) |
| Factor 1 and result field (fixed RPGLE) |
grey #ADADAD |
Known limitations
- Dark theme only.
- Column-based coloring assumes the standard layout of each specification. A source with shifted columns is colored wrongly, just as in RDi.
- A few rarely used items keep the Dark Modern colors because they have not been compared with RDi yet: the EQ indicator of C specs and RPGLE I and P specs.
Credits
- Based on the Dark Modern theme of Visual Studio Code (© Microsoft Corporation, MIT license). See
ThirdPartyNotices.txt.
- Uses the grammars of IBM i Languages by Barrett Otte.
- Not affiliated with or endorsed by IBM. IBM i and Rational Developer for i are trademarks of IBM.
Español
Colorea los fuentes del IBM i en VS Code como el editor de IBM Rational Developer for i (RDi), sobre el tema Dark Modern de VS Code. Las capturas de arriba muestran el resultado con los fuentes de ejemplo de la carpeta samples.
Qué incluye
- Tema
Dark Modern RDi: el tema Dark Modern con los colores de RDi para los fuentes del IBM i. El resto de lenguajes se ven igual que en Dark Modern.
- Reglas de coloreado por columnas que completan las gramáticas de IBM i Languages, para DDS (PF, LF, DSPF, PRTF), RPGLE/SQLRPGLE en free y en formato fijo, RPG III y CL.
- Desactiva el coloreado de paréntesis por parejas en estos lenguajes, para que salgan del color de RDi.
Requisitos: la extensión IBM i Languages, que se instala sola como dependencia.
Cómo se usa: instala la extensión, pulsa Ctrl+K Ctrl+T (o Preferencias: Tema de color) y elige Dark Modern RDi.
Limitaciones: solo hay versión oscura; el coloreado por columnas supone el formato estándar de cada especificación; el indicador EQ de las especificaciones C y las especificaciones I y P de RPGLE conservan los colores de Dark Modern.
No está afiliado ni respaldado por IBM. IBM i y Rational Developer for i son marcas de IBM.
| |