Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@ Search for `r-exec` within package search in the Settings View.

## Configuration

### Keybindings

While `cmd-enter` is bound to sending code in the package, it is also annoyingly bound to entering a new line by default in atom.
In order to make it work, you must add the following binding in `~/.atom/keymap.cson`:

```javascript
'atom-workspace atom-text-editor:not([mini])':
'cmd-enter': 'r-exec:send-command'
```

### Behavior

All configuration can be done in the settings panel. Alternatively, you can edit your configuration file as noted below.
Expand Down
9 changes: 7 additions & 2 deletions keymaps/r-exec.cson
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
# the root workspace element.

# For more detailed documentation see
# https://atom.io/docs/latest/advanced/keymaps
# http://flight-manual.atom.io/behind-atom/sections/keymaps-in-depth/

# eventually make it like R-box with cmd-enter
# and have custom command palette to choose application
# https://discuss.atom.io/t/custom-use-of-the-command-palette/15702/2
'atom-text-editor':
# ---------- Editor --------------
'atom-text-editor[data-grammar="source r"]:not([mini])':
'shift-cmd-e': 'r-exec:setwd'
'cmd-enter': 'r-exec:send-command'
'shift-cmd-u': 'r-exec:send-function'
Expand All @@ -21,3 +22,7 @@
'shift-alt-m': 'r-exec:insert-pipe'
'shift-alt-p': 'r-exec:send-previous-command'
# shift-cmd y, u, i, j, k, x, m

# Override cmd-enter
'.platform-darwin atom-text-editor[data-grammar="source r"]:not([mini])':
'cmd-enter': 'r-exec:send-command'