COBOL 源列的不同背景颜色

发布于 2024-07-13 22:37:11 字数 533 浏览 6 评论 0 原文

我正在寻找一种在 Notepad++ 中“照亮”列的方法。

  • COBOL 编译器会忽略前 6 列以及从第 73 列开始的所有字符(到第 80 列,无论如何,81+ 都会被忽略)。
  • 第七个字符具有特殊含义(注释,调试,...)。
  • 第8到11个字符也有特殊含义。

对于代码查看,对 ^....... 进行正则表达式搜索就足够了,因为 ^.{7} 不起作用。 使用“标记模式”选项,点击“搜索全部”,您将标记前 7 列。

问题是,当您编辑代码时,标记会扩大/缩小/移动,您需要重新进行标记/搜索。

我使用 NotePad++ 5.03 ansi w/o unicode,COBOL 突出显示从其网站安装。

编辑:我也尝试过 “选项”-“视图”-窗格-“主要” View'-“显示垂直限制”但是这个 出现在所有文档中并且仅用于 一栏位置

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

万人眼中万个我 2024-07-20 22:37:11

jEdit 有 COBOL 模式,但它也不以特殊方式处理前七个字符,除非它们后面跟着 * 或 /。 然后整行被视为注释。

应该可以更改编辑模式来改变这一点,不过我有点担心性能。

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.

女中豪杰 2024-07-20 22:37:11

Zeus 编辑器可为大约 30 种语言COBOL< /em> 就是其中之一。

它的 COBOL 模式 配置为不对第 1-6 列进行特殊突出显示,而对 处的任何 '*' 字符进行特殊注释突出显示第 7 列 以及第 8 列之后(包括第 8 列)的所有文本的默认 COBOL 突出显示。 它还具有可移动的右边距来标记 73 列 位置。

它甚至可以进行有限数量的 COBOL 代码折叠。

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.

羁绊已千年 2024-07-20 22:37:11

它表明 Notepad++ 无法突出显示列。

对于 jEdit,我发现了一些可能性,但尚未完成:

  • 插件 ColumnRuler 版本:1.0.2 作者:Brad Mace,
    但它显示在所有文件模式中。
  • 我正在编辑一个新的 COBOL 模式文件,这并不容易,尤其是标记所有文本
    从第 73 列开始。

编辑:COBOL 模式准备就绪并提交,请参阅 https://sourceforge.net/tracker/index.php?func=detail&aid=2654343&group_id=588&atid=350588

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文