views:

1175

answers:

3

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

+2  A: 

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.

Aaron Digulla
thx, I will try jEdit again, the last try was at least a Year ago and it was too slow to work with.
Try the 4.3pre16 with Java 6.
Aaron Digulla
I tried 4.3pre16 with Java Build 1.6.0_11-b03. Performance is good. still no columns downlighting. wrap-marking helps only for 1 marking position, COBOL has four: 7, 8, 12, 73
Open cobol.xml ("Utilities" menu, "jEdit Home Directory", "modes"). The first entry "EOL_SPAN_REGEXP" should give you an idea how to extend the edit mode. After it works, send the changes back to the jEdit team :)
Aaron Digulla
+1  A: 

It seams Notepad++ is not capable of highlighting columns.

For jEdit I found some possibilities but not finished yet:

  • The plugin ColumnRuler Version: 1.0.2 Author: Brad Mace,
    but it is shown in all file modes.
  • I am editing on a new COBOL mode file, thats not so easy, especially marking all text starting with column 73.

edit: COBOL mode ready and commited see https://sourceforge.net/tracker/index.php?func=detail&aid=2654343&group_id=588&atid=350588

+2  A: 

The Zeus editor does syntax highlighting for about 30 languages and COBOL is one of them.

It's COBOL mode is configured to do no special highlighting for columns 1-6, special comment highlighting for any '*' character at column 7 and default COBOL highlighting for all text after and including column 8. It also has a movable right margin to mark the 73 column position.

It even does a limited amount of COBOL code folding.

jussij
sry the line "Modified 22/9/2006" on the website forced me to hit Ctrl-W (close Tab in Firefox). I won't learn shortcuts for an outdated Editor.
The web page might not change but the editor is any thing but outdated and static http://www.zeusedit.com/forum/viewforum.php?f=6
jussij