Hi everyone,
One thing that gets requested a lot is the ability to jump to the REPL with a keystroke. There’s a workaround for this described
here: You can assign a toolwindow number to the REPL toolwindow, say Ctrl-9,
or Cmd-9 on the Mac. Most of the existing toolwindows have equivalent
numbers assigned to them. This number will be displayed on the
toolwindow button. You can then use this key to jump to the toolwindow,
and ESC to jump back. In IntelliJ, ESC always jumps back to the editor
from any tool window.
This has some issues - if the REPL pane is already open and selected when you try to jump to it, it will be closed instead. I’m considering adding an explicit action to do this and make it reliable, i.e. open the REPL pane if it’s closed and select it, and do nothing if you’re already there.
Some users have also requested the ability to have the caret active in the output pane and to be able to switch there with a key, so they can copy and paste without using the mouse. I’ve enabled the caret, but I’m not sure how the keybindings should work. I can think of a couple of obvious options:
1. A single action which cycles around all 3 (editor, REPL, output).
2. Actions which cycle Editor<->REPL, REPL<->Output, and perhaps Output<->Editor.
3. Absolute actions (Jump to last Editor, Jump to REPL, Jump to Output).
Presumably jumping to and from the REPL is much more common than jumping to the output pane, so that would suggest that #2 or #3 would be preferable. For #3, ESC currently works for jumping back to the editor but that may change - currently IntelliJ’s UI rule that ESC in tool windows should always jump back to the main editor is very difficult for IdeaVim users, since ESC no longer works for switching modes in the REPL. I’m considering patching IdeaVim such that Cursive could override the ESC behaviour for the REPL editor, and in that case an explicit “Jump back to Editor” action would be required.
Opinions?
Thanks,
Colin