Skip to content

Mark corresponding variable in String.formatted(..) if cursor is on %s (and vice versa) #4350

@reuschling

Description

@reuschling

If you have big Strings, e.g. block Strings, with some %s (or other) placeholders for variables that are then inserted with an .formatted(...) invocation, it is sometimes really hard to see

  1. where the placeholder occurs in the String, or
  2. which variable name the placeholder refers to.

For 1. a solution would be to mark the corresponding placeholder inside the String if the cursor is on a variable inside .formatted(...)

For 2. one solution would be to highlight the according variable inside the .formatted(..) invocation. An alternative would be a popup with the variable name.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions