holgerbrandl / r4intellij

An integration of the R programming language into Intellij IDEA
BSD 2-Clause "Simplified" License
148 stars 28 forks source link

Provide platform specific/agnostic keybinding defaults for console evaluation #178

Open ihandley opened 6 years ago

ihandley commented 6 years ago

I'm looking for the equivalent of the Run selected lines command (Ctrl+Enter) from R Studio. I believe it's the Evaluate in R Console option triggered by the keyboard shortcut Meta+Alt+Enter. But for the life of me, I cannot figure out how to use the Meta key. I've looked at File > Settings > Keymap and don't find anything there indicating which key is mapped to Meta.

I'm sure this is something super simple, but point me in the right direction?

holgerbrandl commented 6 years ago

Isnt't meta == Ctrl on windows?

ihandley commented 6 years ago

That's what I originally thought, but Ctrl+Alt+Enter does not trigger the Evaluate in R Console command.

holgerbrandl commented 6 years ago

Indeed, same here. See https://stackoverflow.com/questions/32921994/how-to-make-windows-key-the-intellij-idea-command-meta-key-under-windows

So I guess the easiest would be to add a custom keybinding under Settings->Keymap->Evaluate in R Console image

ihandley commented 6 years ago

That suggestion would most definitely work, and I think it's the best solution considering that command seems to be the only one utilizing the Meta key. Is there any reason to not unbind Ctrl+Enter from Split Line? It seems to be doing the same thing as just regular Enter.

AmineI commented 5 years ago

That suggestion would most definitely work, and I think it's the best solution considering that command seems to be the only one utilizing the Meta key. Is there any reason to not unbind Ctrl+Enter from Split Line? It seems to be doing the same thing as just regular Enter.

Well, regular Enter sends the cursor to the new line while Ctrl+Enter does not. But I agree that it's not much of a difference.