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

[Question] How to recall/reopen plot window in Rmarkdown #57

Closed
dcstang opened this issue Feb 26, 2021 · 3 comments
Closed

[Question] How to recall/reopen plot window in Rmarkdown #57

dcstang opened this issue Feb 26, 2021 · 3 comments
Labels

Comments

@dcstang
Copy link

dcstang commented Feb 26, 2021

Hi, thanks for this super work. Plotting in R is splendid now.
(Un)fortunately I need to work with some RMarkdown files.

Plotting works in RMarkdown for me, but when I close the plot window -
I am having difficulty getting it back. I have tried to edit the keyboard shortcut as below to include 'rmd'

    {
        "key": "shift+alt+p",
        "command": "r.runCommand",
        "when": "editorTextFocus && editorLangId == 'r' || 'rmd'",
        "args": ".vsc.browser(httpgd::hgd_url(), viewer = \"Beside\")"
    }

Am I missing something in the when: bit of the keybindings.json?

Nb. manually running .vsc.browser(httpgd::hgd_url(), viewer = "Beside") in R Interactive terminal works.
I think its just the way my keyboard shortcut is setup wrong? Thanks, David.

@nx10
Copy link
Owner

nx10 commented Feb 28, 2021

Hi, thank you for checking out httpgd.

This seems to be a problem with vscode / the vscode-r extension. So maybe it would be better to open an issue on their repository.

For troubleshooting, I would suggest checking if your keybindings.json file is in the right folder and the binding is listed in the visual editor https://code.visualstudio.com/docs/getstarted/keybindings

It would be great to integrate httpgd support directly in vscode-r in the future to make the setup easer for users.

@nx10 nx10 added the vscode label Feb 28, 2021
@dcstang
Copy link
Author

dcstang commented Feb 28, 2021

Hi Florian, thanks for your reply.

Good thinking - I did check and the binding is listed in visual editor as your suggestion.
keybinding in visual editor

I will proceed to open an issue on the vscode-r extension as mentioned. Yes it would be super easy for users in the future hopefully!

Regards, David.

@nx10
Copy link
Owner

nx10 commented Mar 27, 2021

Closing for now, let us know if you run into any more problems.

@nx10 nx10 closed this as completed Mar 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants