Jump to content

Does Alfred support selecting the new text after replacing?


Recommended Posts

Background

There is a good extension for IntelliJ IDEs: CamelCase - IntelliJ IDEs Plugin | Marketplace, it can help you easily switch your text between kebab-case, SNAKE_CASE, PascalCase, camelCase, snake_case or space case.

 

Requirement

I'd like to have such an extension for my whole system. But there is a common problem I found from the existing similar extensions: they only suppport replacing the selected text with new text. But if the type of new text doesn't meed my requirement. I have to reselect the text and trigger the shortcut again. 

 

Question

Does Alfred allow extensions to select the new text which are just replaced? Therefore users can keep type the shortcut until they got the text what they want.

 

Example:

Hello world <=> hello world <=> HELLO WORLD <=> helloWorld <=> HelloWorld <=> hello_world <=> HELLO_WORLD <=>...

Link to comment
8 hours ago, Marfa said:

But there is a common problem I found from the existing similar extensions: they only suppport replacing the selected text with new text.

 

There’s a simple reason for that—doing it another way is more trouble than it’s worth. You can’t simply select text arbitrarily in any app. You can press the keyboard shortcuts necessary to reselect the text, but those will depend on the pasted text itself so then you also need to keep a reference to what was pasted before.

 

8 hours ago, Marfa said:

Therefore users can keep type the shortcut until they got the text what they want.

 

Why not instead use a Workflow which gives you a preview of the text before it’s pasted? Like Change Case.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...