Skip to content

Feature Request: Specification of place holders #356

@byxrolland

Description

@byxrolland

Please allow users to specify place holder texts inside codes.

Summary

After specifying place holders, the plug-in should display the place holder texts with a slanted style to indicate that they are not exactly part of the code.

Basic example

In the second style of C++ class declaration, we should be able to write

```cpp place_holder:"<class-key>","<attr(optional)>","<base-clause(option)>","<member-specification>"
<class-key> <attr (optional)> <base-clause (optional)>
{ <member-specification> }
```

to denote the place holder texts inside a code block. The texts specified should have a unique style (most likely slanted grey) and can escape from the normal code highlighting rules.

To use it inline, one can write:

`{place_holder}<class-key>`: one of class, struct and union. The keywords class and struct are identical except for the default member access and the default base class access. If it is union, the declaration introduces a union type."

to display <class-key> in the same style as in the code block.

Furthermore, one may specify in the code block place_holder:"<class-key>"as"class",... to let the <class-key> be passed as class in the code highlighting.

Motivation

Without specifying the place holders, the class declaration above would look wield. This is due to the fact that place holders are part of the code but not exactly part of the code. Some of the place holders are user-given names. But others are holding the place of keywords in the programming language but can't be recognized by normal code highlighting, like class-key. Them having their own rule will make the code clearer and nicer looking.

Existing Requests?

I haven't found any.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions