-
Notifications
You must be signed in to change notification settings - Fork 137
Open
Labels
Description
Title: Feature Request: Implement Output Insertion as Comments for Evaluated R Code
Description:
I propose adding a feature to vscode-R that allows users to evaluate selected R code and automatically insert the output as comments in the editor. This feature, inspired by a similar functionality in Nvim-R, would enhance the data analysis workflow by allowing immediate inspection and documentation of code outputs within the editor.
Reference:
- https://github.com/jalvesaq/Nvim-R/blob/5f3876a53fdceae4ee6c022bf94d24ca3d6bc1a2/doc/Nvim-R.txt#L378
- https://github.com/jalvesaq/Nvim-R/blob/5f3876a53fdceae4ee6c022bf94d24ca3d6bc1a2/R/start_r.vim#L827
Key Points:
- Select and evaluate R code in the editor.
- Capture the output and insert it as a comment directly below the evaluated code.
- Useful for iterative exploration and documentation in data analysis.
Implementation Suggestion:
- Extend existing 'send code to terminal' functionality.
- Add a method to capture terminal output and format it as a comment in the editor.
Impact:
This feature would streamline the R coding process in VS Code, making it more efficient for data analysis and similar tasks.