Working with .conf files - splunk/vscode-extension-splunk GitHub Wiki

This extension introduces several useful features for working with Splunk Enterprise .conf files.

Stanza Completion

To enable stanza code completion, simply create or open a Splunk Enterprise .conf file (for example, inputs.conf). When you type a [ character, all valid stanza for the current .conf file will be displayed.

Setting Completion

To enable setting code completion, start typing text on a line under a stanza or press Ctrl + Spacebar to display available settings for the current stanza. Documentation about these settings will also be displayed.

Stanza Folding

When working with long files, stanzas can be collapsed for easier viewing. To collapse or expand all stanzas, use the following shortcuts:

Fold All:

  • Windows: Ctrl + k + 0
  • Mac: + k + 0

Unfold All:

  • Windows: Ctrl + k + j
  • Mac: + k + j

Linting

Linting is the process of running a program that will analyze code for potential errors. This extension compares stanzas and settings to .spec files to call attention to potential errors.

⚠️ **GitHub.com Fallback** ⚠️