tpae / node-repl

JavaScript Read-Eval-Print-Loop (REPL) for Atom
MIT License
11 stars 3 forks source link

Keymaps… #12

Open tbremer opened 7 years ago

tbremer commented 7 years ago

So, the current keymapping on macOS is the same as closing windows (cmd+w) and fuzzy-finder (cmd+t).

I (currently) have mine setup to be all ctrl based:

'atom-workspace':
  'ctrl-r': 'node-repl:run'
  'ctrl-w': 'node-repl:toggle'
  'ctrl-c': 'node-repl:clear'

However, we could take a cue from the atom core team and make platform-dependent keybindings…

Like:

{
  "atom-workspace": {
    "ctrl-shift-r": "node-repl:run",
    "ctrl-shift-w": "node-repl:toggle",
    "ctrl-shift-c": "node-repl:clear",
  },
  ".platform-darwin atom-workspace": {
    "ctrl-r": "node-repl:run",
    "ctrl-w": "node-repl:toggle",
    "ctrl-c": "node-repl:clear",
  }
}

Any thoughts in one direction or the other?

tpae commented 7 years ago

I didn't put too much thought in current mappings (just randomly picked), I think what you say makes sense. I agree with you, we should use inputs that's currently not in use.

I also think having run and toggle makes it a 2-key operation to start, can we trigger toggle on run as well? Maybe we can add a close button, and possibly get rid of toggle.

I am also not sure whether our package will run on other platforms (haven't tested yet).