Page 1 of 3
COBOL Lexer
Posted: 23.01.2021 01:15
by Paolo_R
Is it possible to display vertical lines according to settings requested e.g. at columns 8, 12, 16, ... 72. This would help greatly in formatting COBOL code.
Posted: 23.01.2021 09:41
by Shovel
I'm not familiar with COBOL...
But if
this is what you want, you can set option "margin_string" to "8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72" for COBOL lexer.
Posted: 23.01.2021 18:33
by uvviewsoft
yes, "margin_string".
we have 2 lexers: Cobol and Acu_Cobol, I don't recall what is the difference.
Posted: 24.01.2021 00:03
by Paolo_R
Shovel wrote:I'm not familiar with COBOL...
But if
this is what you want, you can set option "margin_string" to "8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72" for COBOL lexer.
OK, thanks. How do I edit the COBOL lexer? According to the WIki I have to install SynWrite. Is that correct?
Posted: 24.01.2021 00:05
by Paolo_R
uvviewsoft wrote:yes, "margin_string".
we have 2 lexers: Cobol and Acu_Cobol, I don't recall what is the difference.
Acu-Cobol is a particular dialect of Cobol i.e. with non-standard extensions.
Posted: 24.01.2021 06:48
by Shovel
Paolo_R wrote:OK, thanks. How do I edit the COBOL lexer? According to the WIki I have to install SynWrite. Is that correct?
No SynWrite.
In CudaText main menu open "Plugins > Options Editor...", here when you check "For Lexer", changed options will only apply to the Lexer specified below.
Posted: 24.01.2021 07:16
by Paolo_R
OK, I've found margin_string but there seems no way to make a change, or in this case, to add a list of margins. I can't add changed margins to that option.
Posted: 24.01.2021 07:20
by Shovel
On
this screenshot I have it for ini lexer.
Posted: 24.01.2021 08:41
by Paolo_R
Well I have made changes exactly as your screen shot showed but the margin lines do not show up when I open a .CBL file.
Posted: 24.01.2021 09:29
by Shovel
When you have file open with COBOL lexer active, open menu "Options > Settings - Lexer Specific", and check that there is a line present:
Code: Select all
"margin_string": "8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72",
If it is there, but it is still doesn't work - maybe try restarting the editor.