Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Refactoring support in Atom.
Failed to load latest commit information.
keymaps Fix #16 #17 #18 #20. Use the 'atom-text-editor' tag instead of the 'e…
lib Fixes #12 #13 #19 #23. "Atom.Object.defineProperty.get is deprecated."
spec Add a fixture for #9
styles Fixes #26. "Package.getStylesheetsPath is deprecated."
.gitignore Initial commit
.travis.yml Add travis config Add log for v0.4.1 Fixes #26. "Package.getStylesheetsPath is deprecated." Add minodisk/atom-refactor source files
package.json Prepare 0.4.1 release

Refactor Package

:zap:Notification:zap:: Activate 'Use React Editor' in preferences pane. Refactor package greater than v0.3 no longer supports for the legacy editor. If you want more info about the React Editor, you can see React Editor Enabled by Default.

Let's refactor code! With this package, you can rename the name of variables and functions easily.


Language plugins

This package works with these language plugins. You can install using the preferences pane.


  1. Set cursor to a symbol.
  2. Start renaming by using ctrl-alt-r.
  3. Type new name.
  4. Finish renaming by using enter or removing cursor from the focused symbol.

User setting

  • Override keymap by using Atom > Open Your Keymap.
  • Override stylesheet by using Atom > Open Your Stylesheet.

API Documentation (for plugin developer)


Add refactor as engines in package.json.

  "engines": {
    "atom": ">0.50.0",
    "refactor": ">0.4.0"


You should implement Ripper class in main module.

  • Ripper.scopeNames []String : [Required] Array of scope name, like '', 'source.js' and all that.
  • Ripper#parse(code String, callback Function) : [Required] Parse code, and you should callback when the parsing process is done. Callback specify the params as an array of error Object. The error Object should have params range and message.
  • Ripper#find(point Point) []Range : [Required] Return an array of found symbols' Range at the passed Point.
{ Range, Point } = require 'atom'
class Riper
  @scopeNames: []
  parse: (code, callback) ->
    # parse code
    callback [
      range = new Range()
      message: 'foo'
  find: (point) ->
    # find references
      new Range()
      new Range()
      new Range()



Something went wrong with that request. Please try again.