REditorSupport / vscode-R

R Extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=REditorSupport.r
MIT License
1.07k stars 128 forks source link

Keyboard shortcut for "run from line 1 to cursor line" #288

Closed michaeldorman closed 4 years ago

michaeldorman commented 4 years ago

Is your feature request related to a problem? Please describe. No

Describe the solution you'd like I'd like to be able to use the shortcut Ctrl+Alt+B to send the code from line 1 to the line where the cursor is, to the console/terminal. The cursor position should remain unchanged. (The latter shortcut exists in RStudio.)

Describe alternatives you've considered The alternative is to select the code manually using Shift+PageUp followed by Ctrl+Enter to send the selection. This is inconvenient because then I need to go back and find the line where I was using PageDown and arrow keys.

Additional context For example, if in the attached screenshot the cursor is on line 8 column 22, then after pressing Ctrl+Alt+B I would like to see lines 1-8 inclusive executed, while the cursor remains on line 8 column 22.

Thanks you very much for any help & thanks for building this excellent extension!

Screenshot from 2020-04-22 16-11-53

andycraig commented 4 years ago

@michaeldorman Thanks for creating! I will work on this.

michaeldorman commented 4 years ago

@andycraig Thank you!