Trying adding new shortcut/command. Not working


#1

So I have several files that are text and they have some urls that are encoded.I added EscapeUtilities and want to make a shortcut for the keyboard to execute the decode process.

I trid this:
‘atom-text-editor’:
‘ctrl-alt-d’: 'escape-utils:url-decode’
didnt work.

Also this:
‘url-encode’:
‘ctrl-alt-d’: 'url-encode:decode’
with another package,still nothing.

What am I doing wrong?:confused:


#2

The top-level key is a CSS selector, so url-encode there tells Atom to look for an element with the tag <url-encode>.

Let’s start at the beginning. What is the command you want to bind? Your post includes two different command names.


#3

Lets use url-encode:decode
since both of them do the same.


#4

You want your keymap.cson entry to look like this:

'atom-text-editor':
  'ctrl-alt-d': 'url-encode:decode'

If that doesn’t work immediately, you can open the Keybinding Resolver (ctrl-. by default on non-Mac) and try again, screenshot the Keybinding Resolver panel, and post it here. I can tell you what’s overriding it and how to make it work.


#5

Thank you ever so much.It worked :slight_smile: