ecdc icon indicating copy to clipboard operation
ecdc copied to clipboard

Shortcut for specific function

Open surpavan opened this issue 5 years ago • 5 comments

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?

surpavan avatar Jan 19 '20 06:01 surpavan

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.

mitchdenny avatar Jan 04 '21 00:01 mitchdenny

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 <.

haleypearse avatar Mar 30 '21 21:03 haleypearse

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

gmccullo avatar Jul 08 '22 07:07 gmccullo

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 avatar Aug 10 '22 18:08 Dr-Bones2

Also - my thanks too for this package...

Dr-Bones2 avatar Aug 10 '22 18:08 Dr-Bones2