Search code examples
syntax-highlightingnotepad++cobolhighlightingjedit

Different Background color for columns of COBOL source


I am looking for a way to "downlight" columns in Notepad++.

  • the COBOL compiler ignores the first 6 columns and all characters starting from column 73 (to column 80, 81+ is ignored anyway).
  • The seventh character has a special meaning (comment,debug, ... ).
  • The 8th to 11th characters have also a special meaning.

for code-viewing it is sufficient to do a reg-ex search for ^....... because ^.{7} is not working. With the option 'Mark Pattern' hit 'Search all' and you got the first 7 columns marked.

The problem is, when you edit the code, the marking is expanded / shrinked / moved and you need to redo the mark/search.

I use NotePad++ 5.03 ansi w/o unicode, COBOL highlighting installed from its website.

edit: I also tried 'options'-'View'-pane-'Primary View'-"show vertical limit" but this is shown in all documents and only for one column-position


Solution

  • jEdit has a COBOL mode but it also doesn't treat the first seven characters in a special way, except when they are followed by * or /. Then the whole line is treated as a comment.

    It should be possible to change the edit mode to change this, I'm a bit worried about the performance, though.