Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

How to specify key binding or macro to launch an SBT REPL? #308

Open
mslinn opened this Issue · 2 comments

2 participants

@mslinn

The menu selections to do this are: Tools / Sublime REPL / Scala / SBT for opened folder, then type console to enter the SBT REPL which has the full classpath of the project. Assuming that it is possible to define a user key binding for this, what would it look like?

Even better, a key binding for splitting the Sublime window horizontally and then starting the REPL in the bottom pane should do the following:

1) ⌘ - shift - 2 ( enter 2 row mode)
2) Somehow select the bottom pane
3) Start the Scala REPL in the bottom pane using menu items Tools / Sublime REPL / Scala / SBT for opened folder
4) Type 'console' to start evaluation, or ~console to cause re-evaluation upon exit

Suggestions on how this might be accomplished?

Thanks,

Mike

PS: The Ctrl, key bindings work, but it takes a lot of keystrokes to get the SBT console running first.

@wuub
Owner

Hi @mslinn

a keybinding to start scala repl can be defined as shown in this file: https://github.com/wuub/SublimeREPL/blob/master/config/Scala/Default.sublime-commands#L11 a "run_existing_window_command" is what you're looking for.

If you've got this setting enabled (open_repl_in_group): https://github.com/wuub/SublimeREPL/blob/master/SublimeREPL.sublime-settings#L16 and SublimeText split into at least two rows/columns REPL views should be placed in the inactive group.

Let me know if it helps.

@mslinn

wuub,

I don't see a key binding in Default.sublime-commands. This is all I see for run_existing_window_command:

 {
    "caption": "SublimeREPL: Scala",
    "command": "run_existing_window_command", "args":
    {
        "id": "repl_scala",
        "file": "config/Scala/Main.sublime-menu"
    }
}

Also, none of the steps (1..4) I listed are performed by the command. How can I set this up with a key binding?

Thanks,

Mike

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.