Refactor is not working at all


note: as new users can only upload one picture per post, there’s two links to images in imgur. Plus, new users can use two links per post, so.

Hello, I’m facing this problem for hours. The default keystroke of Refactor ( is ctrl-alt-r, which is already used by the editor to reload. So what have I tried? Change the keystroke in the user/.atom/keymap.cson. I set them for:

  'ctrl-alt-u': 'refactor:rename'
  'enter': 'refactor:done'

So far so good, I opened the key binding resolver and checked: @rafaelcn types ctrl-alt-u. Guess what? It shows:

As expected! I checked again in Settings -> Keybindings -> ctrl-alt-u:

Ok, let’s try for real, I open a file that I want to refactor, type ctrl-alt-u and then… (expectation face :smiley:) nothing happens :sweat:

I’ve tried in a file as you can see in the image above, but, nothing happens, the three yellow underlined lines should be highlighted, shouldn’t? I wanna know if this is a Refactor problem, or is something related to my keymap.cson config, or even with Atom. Thanks in advance :smile:.


Uploaded the images for you. Sorry the spam/troll protections got in your way :blush:

As to your issue, with the default theme, Keybinding Resolver lists all keys that could apply but if it actually triggers one, it shows up in green. So we need to diagnose why the keybinding is being recognized but not executed.

It looks like the refactor package requires additional plugins to work?

Do you have the js-refactor package installed?


Yup, ‘js-refactor’ package is installed.


Can you try manually executing the command from the Command Palette and see if anything happens?


I did it, nothing happens as well.


Ok, then it is possible that the command is being executed by Atom, but the package “refuses” it because there’s nothing to do (as far as it is concerned). I would take a look at the refactor package or js-refactor packages themselves for the solution.


OK, I gonna look to see how it works as I don’t know how to code in coffee script and either how the Atom deals with packages :smile:.


That’s why is not working @leedohm and everybody else:


Thanks for linking the issue for others. It will help interested parties in the future, I’m sure.