Edit Cobol files with Visual Studio Code
Variables are suggested on several Cobol commands, such as move, if, subtract, add and others. Constants are also considered, each one appearing with a different icon on IntelliSense.
Paragraph suggestion and documentation
This extension suggests paragraphs based on what is typed on perform clause. Notice that it also parses a java-like documentation for paragraphs, as follows.
When mouse is over some Cobol keywords, the related keywords are highlighted for better understanding.
You can also peek Cobol variable and paragraph definitions!
Formatter and loop completion
The Language Server provides automatic formatting for several Cobol clauses as shown below:
IntelliSense for variable declaration
The variable declaration is done in two steps so that the extension parses the picture and generates the most approprivate VALUE in the VALUE clause:
This extension provides by default several snippets related to Cobol functions/commands to make typing easier and faster. Besides, user can add personal snippets and even filter the filename with a RegEx, making them only appear to specific groups of files.
First of all, configure the directory where specific JSON snippets are located:
Second, create one or more JSON files following the example below. This example adds two snippets for files with name containing WREG.
Snippet placeholders are also supported.
This extension is designed for Cobol code developed with FREE FORMAT style, and is not fully prepared for FIXED FORMAT. Comment lines are treated as *> and not as * which is typically used in FIXED mode.