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

ctrl-enter does not run command when linebreaks are used within function calls #457

Open
bfrank5 opened this issue Jan 11, 2024 · 1 comment

Comments

@bfrank5
Copy link

bfrank5 commented Jan 11, 2024

I have noticed that commands are not always automatically ran when using ctrl-enter to send commands to the R interactive terminal when using VSCode. My educated guess is that this is caused by linebreaks within function calls.

For example,

print("here")

seems to work when sending to the terminal but

print(
  "here"
)

does not. By which I mean the command is sent to the terminal, but it is not executed automatically. I have to manually click the terminal and hit enter, then click back to the editor pane.

Some other examples:

print(
  "here")

seems to work as well as

print("here"
)

Any ideas? I also use vi mode, not sure if that is related.

@willvieira
Copy link

This problem seems to be associated with the VSCode extension vscode-R.

I fixed it following the recommendations from here: you have to activate the R: Bracketed Paste option in the VSCode settings.

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

2 participants