Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

r.executeInTerminal undoes clearing console with ctrl + L #67

Open
dorothee-j opened this issue May 14, 2021 · 3 comments
Open

r.executeInTerminal undoes clearing console with ctrl + L #67

dorothee-j opened this issue May 14, 2021 · 3 comments

Comments

@dorothee-j
Copy link

Problem:

I use Ctrl + L to clear the R console. However, whenever I send commands from a script to the console using r.executeInTerminal. (In my case bound to Ctrl + Enter), the console "comes down" again, with all its previous contents. (It basically "undoes" Ctrl +L)
This does not happen when I type commands directly into the R console. And its also not happening when using Ctrl + R in the "vanilla" R programm.

As they say, a picture is worth more than a thousand words:
Animation

Things I considered:

  • Couldn't find a description of my issue anywhere online.
  • Scrolled through the settings for the extension, nothing striking me.
  • As mentioned earlier, this does not happen in the "standard" R program.

Any hints or help would be much obliged. :)

@MikhailArkhipov
Copy link
Owner

Related microsoft/vscode#20013. Terminal content is 100% recreated when window reloads.

@MikhailArkhipov
Copy link
Owner

So I tried R.exe (this is what VS Code runs) and Ctrl+L does not clear it. Ctrl+L does work in RGui app. Are you on Windows or Mac?

@seebruck
Copy link

seebruck commented Aug 18, 2021

I'm also running R in VSCode and Ctrl + L does not clear the console. If I open RGui on its own, Ctrl + L works fine. I'm not sure what the problem is, but as a workaround I simply made a custom keyboard shortcut in VSCode.

  1. First, open VSCode's keybindings.json by typing Ctrl + Shift + P to bring up the Command Palette (alternatively: View > Command Palette)
  2. In the Command Palette search box, input "Preferences: Open Keyboard Shortcuts (JSON)" and select it.
  3. This will open the Keyboard Shortcuts (JSON) editor, where you can now enter the following: {"key": "ctrl+l", "command":"workbench.action.terminal.clear"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants