Copying from a devicetree file

nRF Connect for VS Code

tags
nRF Connect for VS Code

To copy C identifiers directly from a devicetree file:

  1. Select the string in the file.
  2. Right-click the string label.
    The context menu appears.

    Copy C Identifier

  3. Click Devicetree: Copy C Identifier.
    If the selected symbol has a corresponding C macro, like DT_PROP(DT_NODELABEL(adc), label), it is copied to the clipboard. If it has more than one macro, a quick pick appears asking you to select one.

A notification confirms that the string has been copied.