Add support for Viewing `rds` files
I save R objects regularly as rds files, and it would be great to view them as one can with other file types. An example would be the docx viewer which opens tab with a view of the document. This view should be read only, but editing could be a nice plus. This obviously would only work for tabular data. If the data is not tabular, a message could be displayed.
At the moment, I am using readRDS() |> View() in the running R session, but a bild in solution would be really useful.
Maybe you should consider incorporating a customizable keybinding like this:
{
"key": "ctrl+r ctrl+v",
"command": "r.runCommandWithSelectionOrWord",
"when": "editorTextFocus && editorLangId == 'r' || editorTextFocus && editorLangId == 'rmd'",
"args": "utils::View(readRDS($$))"
}
Sounds like a solution.
I have put this into my keybinding.json. Then I have to press ctrl+r ctrl+v when the rds is selected in the browser panel? I tried this, but it does not work. What am I doing wrong?