Configuring the Editor

To customize the editor on a global level:

  1. In Visual Studio Code, click File > Preferences > Settings.
  2. Expand Extensions, and click Micro Focus COBOL.
  3. Use Micro Focus COBOL: Install Location to specify the path to the install location of your licensed Micro Focus COBOL or Enterprise Developer product.
  4. You can specify the following editor settings:
    • Micro Focus COBOL > Editor: Dialect - the default COBOL dialect for the editor.
    • Micro Focus COBOL > Editor: Improved Tab Stops - Enabled by default. Depending on the source format of the code, COBOL can have irregular tab stops. This option improves the behavior of the TAB key and the SHIFT+TAB key combination so that it adjusts the indentation of the code based on COBOL tab stops.
    • Micro Focus COBOL > Editor: Source Format - this is used for the COBOL colorization in the editor.

You can specify more editor settings in the global Visual Studio Code settings.json file:

  1. On the Visual Studio Code Settings page, click Open Settings (JSON), ().

    This opens the global settings.json in the editor. The location of the file is %userprofile%\AppData\Roaming\Code\User (Windows) or ~/.config/Code/User (Linux) for default installations.

  2. Type settings and their values as described in Microsoft: Visual Studio Code - User and Workspace Settings.

    For example, you can configure:

    COBOL Source format and dialect
    Use the following settings:
        "microFocusCOBOL.dialect": "Enterprise COBOL for z/OS",   
        "microFocusCOBOL.sourceFormat": "fixed"
    Custom colors for the COBOL words
    You can customize the colors of the COBOL words in the editor. This can be useful if your Visual Studio Code theme makes it difficult to see certain colors.

    Use the editor.semanticTokenColorCustomizations property with the rules option, and modify the settings prefixed with cobol. For example:

        "editor.semanticTokenColorCustomizations": {
            "enabled": true,
            "rules": {
                "cobol-identifier": "#3b8dda",
                "cobol-keyword": "#ff0000",

To customize the editor for the COBOL file open in it: