Edit Cobol files with Visual Studio CodeVariable suggestionVariables 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 documentationThis extension suggests paragraphs based on what is typed on perform clause. Notice that it also parses a java-like documentation for paragraphs, as follows. Code highlightWhen mouse is over some Cobol keywords, the related keywords are highlighted for better understanding. Peek definitionYou can also peek Cobol variable and paragraph definitions! Formatter and loop completionThe Language Server provides automatic formatting for several Cobol clauses as shown below: IntelliSense for variable declarationThe variable declaration is done in two steps so that the extension parses the picture and generates the most approprivate VALUE in the VALUE clause:
SnippetsThis 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. ConsiderationsThis 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. |