Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Select text and add hotkey OR add a command to automatically convert current selection to text #341

Open
NylaTheWolf opened this issue Oct 23, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@NylaTheWolf
Copy link

Description of the Problem

It's annoying to have to manually add text and have to fix the bracket placement, such as when I have Student(x) and I want "Student" to be in plaintext. If I wanted to fix it after typing "Student", I'd have to type the shortcut for /text{}, and then delete the last bracket and add it to the end of "Student".

Description of the Solution

I would like to have the option to be able to highlight the text and type a shortcut like "T" to automatically convert the current selection to text, like the visual snippets.

Alternatively, you could add it to the command palette like you did for \boxed

Additional

N/A

N/A

@NylaTheWolf NylaTheWolf added the enhancement New feature or request label Oct 23, 2024
@bdm-k
Copy link
Contributor

bdm-k commented Oct 31, 2024

Hello,

How is your proposal different from the visual snippets?

@NylaTheWolf
Copy link
Author

I didn't see anything in the README about any snippets that give selected text the \text tag. Is there something I missed?

@bdm-k
Copy link
Contributor

bdm-k commented Dec 3, 2024

You can define a visual snippet to accomplish that. Try adding the following line to your snippets and see if it does the trick:

{ trigger: "T", replacement: "\\text{ ${VISUAL} }", options: "mA" },

@NylaTheWolf
Copy link
Author

Oh! That worked! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants