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

Shortcut for specific function #59

Open
surpavan opened this issue Jan 19, 2020 · 5 comments
Open

Shortcut for specific function #59

surpavan opened this issue Jan 19, 2020 · 5 comments

Comments

@surpavan
Copy link

Firstly, Thank you for the helpful package.
I use the string to html entities function the most, and I want to bind the ctrl+alt+c to do this string to HTML function only, to avoid the additional step to select the string to html.
How can I do that?

@mitchdenny
Copy link
Owner

At the moment this isn't possible. Key bindings are tied to commands, and the conversion functions are not implemented as commands, they are just an item which is offered up in the pick-list. In order to do this we would need to register a separate command for each conversion so that folks could go in and manually bind them. I'd accept a PR for this.

It would involve:

  1. Creating an entry for each conversion function in the package.json file.
  2. Hoisting the list of converters into a field.
  3. Extending the command registration function to register a command for each converter.

@haleypearse
Copy link

Hi, thanks for the extension. I'm commenting here because your suggestion above could be just what I need. I would also be using string to entities, and the reverse, to manually edit Report Builder rdl (xml) files. My problem is some entities (e.g. &nbsp;) are incompatible with Report Builder, and I only need to convert select characters such as <.

@gmccullo
Copy link

gmccullo commented Jul 8, 2022

Couldn't you achieve this with args? We could create a keybinding and pass args to to it like "encode-string-to-url".

@Dr-Bones2
Copy link

I too exclusively use the STRING TO (DECIMAL) HMTL ENTITY and I do it very, very often; so really need a quicker way of doing this...
I'm a school maths teacher and prefotmatted text is how I write help for my students - as it is quick and easy...
I'm new to VS Code and to be honest, a bit of a dinosaur...
I didn't fully understand the bit where you said "I'd accept a PR for this": But, if you intirudced a separate (paid) extension that allowed for just the use I need, or a shortcut for it, I now I'd pay - and I know a lot of other older users like me would too...

@Dr-Bones2
Copy link

Also - my thanks too for this package...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants