Highlight "do not edit by hand" in scripts
I was wondering if it could be possible to add a banner or at least highlight text "do not edit by hand" that appears on top of R/Rmd files so that the user can identify files in Read-only mode.
That would be useful for NAMESPACE file for instance when developing packages, that gets this lines automatically with {roxygen2}
This issue is stale because it has been open for 365 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
If possible, I would like to reopen this issue.
Recently, the support for individually configured read-only editors was added (https://code.visualstudio.com/updates/v1_79#_readonly-mode). One way to achieve (roughly) what you described would be the following config entry. Note that it sets all temporary R files (following the Rtmp... naming pattern) as read-only, though.
"files.readonlyInclude": {
"NAMESPACE": true,
"**/Rtmp*/*.R": true
}
There does not seem to be much of an API yet to automatically set editors as read-only, apart from the commands "Set Active Editor Readonly in Session" etc., but maybe those will be added in the future and then we can set documents to read-only from within the extension.
This issue is stale because it has been open for 365 days with no activity.