Skip to content

Auto-wrap selected code with a chosen tag. #2403

@abose

Description

@abose

Discussed in https://github.com/orgs/phcode-dev/discussions/2398

Originally posted by brazenCoding September 15, 2025
So I don't see how auto-closing of tags is a useful feature and maybe that can be explained here, but I was thinking it would be neat if I can highlight code, hit a hotkey that opens an in-line modal, type the tag I want wrapped around the selected code, hit enter to close the modal, apply the tag around the selected code, and finally it focuses the cursor after the text of the open tag if I want to add attributes, classes or styles to the tag.
Actually it'd be even cooler if the modal understood those attributes too and the entire opening tag can be written in the modal if I wanted (but still focuses at the end of the open tag if there's anything else I think of after hitting enter)
A lot of the time, I am thinking about the content of a section before I properly wrap it in appropriate tags, so it would save me a lot of effort with the current way where I'm writing my open tag and then cutting and pasting the closing tag at the end of the content.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature RequestFeature requests from customers

    Type

    No type

    Projects

    Status

    To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions