Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Format RPG - Change to format overlay #2422

Open
a4ginatl opened this issue Dec 16, 2024 · 4 comments
Open

Fixed Format RPG - Change to format overlay #2422

a4ginatl opened this issue Dec 16, 2024 · 4 comments

Comments

@a4ginatl
Copy link

Today I was editing a fixed format program and noticed the format overlay. Initially I loved it as it is needed. I do not write fixed format code and when I do (usually maintaining code), it has been difficult to find the positioning of the fields and op-codes.

The problem I have with it is, it overlays the previous line to the line being edited. The overlay is so confusing and is leading to errors as you cannot see the contents of the previous line.

I would like to suggest replacing the overlay over the previous line with "inserting" the format between the previous line and the line being edited.

Alternately, is there a key sequence to turn this feature on and off as required?

Thank you,
Darryl Freinkel


⚠️ REMOVE THIS LINE AND ANY SENSITIVE INFORMATION BELOW! ⚠️

Context Version
Code for IBM i version 2.14.5
Visual Studio Code version 1.96.0
Operating System win32_x64
Active extensions
COBOL (cobol): 24.12.14
Code for IBM i Walkthroughs (vscode-ibmi-walkthroughs): 0.5.0
Configuration Editing (configuration-editing): 1.0.0
Db2 for IBM i (vscode-db2i): 1.7.0
Emmet (emmet): 1.0.0
Error Lens (errorlens): 3.21.0
Git (git): 1.0.0
Git Base (git-base): 1.0.0
GitHub (github): 0.0.1
GitHub Authentication (github-authentication): 0.0.2
IBM i Debug (ibmidebug): 2.0.2
IBM i Project Explorer (vscode-ibmi-projectexplorer): 2.12.0
JSON Language Features (json-language-features): 1.0.0
Merge Conflict (merge-conflict): 1.0.0
Node Debug Auto-attach (debug-auto-launch): 1.0.0
RPGLE (vscode-rpgle): 0.28.2
Source Orbit (vscode-sourceorbit): 1.0.2
TODO Highlight (vscode-todo-highlight): 1.0.5
TypeScript and JavaScript Language Features (typescript-language-features): 1.0.0

Remote system
Setting Value
IBM i OS V7R4M0
Tech Refresh 9
CCSID Origin 65535
Runtime CCSID 65535
Default CCSID 37
SSHD CCSID ?
cqsh true
SQL Enabled
Source dates Enabled

Enabled features

/QOpenSys/pkgs/bin /usr/bin /QSYS.lib/ILEDITOR.lib /QSYS.LIB /QIBM/ProdData/IBMiDebugService/bin /QOpenSys/QIBM/ProdData/JavaVM/jdk80 /QOpenSys/QIBM/ProdData/JavaVM/jdk11
bash attr GETNEWLIBL.PGM QZDFMDB2.PGM startDebugService.sh 64bit 64bit
chsh iconv
grep setccsid
ls tar
md5sum uname
sort
stat
tn5250
Shell env
BUILDLIB=QGPL
CURLIB=QGPL
HOME=/home/dfreinkel
HOST=172.17.72.21
LIBLS=QRYLIB DPSRCLIB DPOBJLIB DPPDATA QGPL QTEMP OPRUTLLIB DFREINKEL
LOGIN=dfreinkel
LOGNAME=dfreinkel
MAIL=/var/spool/mail/dfreinkel
OLDPWD=/home/DFREINKEL
PASE_USRGRP_LIMITED=N
PATH=/QOpenSys/pkgs/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin
PWD=/home/dfreinkel
SHELL=/QOpenSys/pkgs/bin/bash
SHLVL=1
SSH_CLIENT=10.27.230.188 53514 22
SSH_CONNECTION=10.27.230.188 53514 172.17.72.21 22
TZ=<EST>5<EDT>,M3.2.0,M11.1.0
USER=dfreinkel
USERNAME=DFREINKEL
WORKDIR=/home/dfreinkel
_=/QOpenSys/pkgs/bin/env
Variants
{
  "american": "#@$",
  "local": "#@$",
  "qsysNameRegex": {}
}
@worksofliam
Copy link
Contributor

@a4ginatl sadly it's not possible to insert between lines so we had to implement as an overlay.

Yes, you can change the enabled default in the VS Code settings. The shortcut on windows is Shift+F4

@heymchri
Copy link

@worksofliam nice feature! Any way we can get this on non-ILE RPG?

@worksofliam
Copy link
Contributor

@heymchri if you want to send me all the rulers you want supported for OPM RPM, I can look into it - thanks!

@heymchri
Copy link

@worksofliam here's a (partial) list for OPM RPG:
(the characters before the : is the ID of that format in SEU)

H : .....H........1..CDYI....S..............1.F...............................Pgm-id

FX: .....FFilenameIPEAF........L..I........Device+......KExit++Entry+A....U1........
FC: .....F............Ext-record..................RcdnbrKOptionEntry+++.............

E : .....E....FromfileTofile++Name++N/rN/tbLenPDSArrnamLenPDSComments+++++++++......

L : .....LFilename066Fl060Ol........................................................

DS: .....IDsname....NODsExt-file++.............OccrLen+.............................
JX: .....I..............Ext-field+......................Field+L1M1..PlMnZr..........
I : .....IFilenameSqNORiPos1NCCPos2NCCPos3NCC.......................................
J : .....I....................................PFromTo++DField+L1M1FrPlMnZr..........
N : .....I..............Namedconstant+++++++++C.........Fldnme......................

C : .....CL0N01N02N03Factor1+++OpcdeFactor2+++ResultLenDHHiLoEqComments+++++++......

O : .....OName++++DFBASbSaN01N02N03Excnam...........................................
P : .....O................N01N02N03Field+YBEnd+PConstant/editword+++++++++..........

One other thing I noticed - if the 'Source Dates in Gutter' setting is on, the ruler is not in line with the code:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants