Skip to content

Provide if, for, while, etc. as snippets instead of plain keywords #2118

Open
@notfirefox

Description

@notfirefox

Description

Other language servers, e.g. clangd, provide snippets for control structures such as if, for, while, etc. Accepting a suggestion for one of those keywords then will insert the following text:

if expression {
    |
}

The cursor will first be on expression, allowing the user to enter the expression that controls the if statement. Pressing the tab key will move the cursor to the next location, i.e. | - where the user can write the code that shall be executed when the expression is true.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions