Read-only: Non-workspace FilesThis extension will automatically set any non-workspace files to read-only in the editor. This does NOT change their read/write status in the filesystem. This works for any non-workspace files upon start-up (or reload) of vscode and when opening a file in an existing workspace (as by dragging and dropping from a file explorer for example). Works in single and multi-root workspaces. A lock icon will appear in the editor tab for any file set as read-only. Extension SettingsThis extension contributes the following setting:
Disabling the extension does NOT unset any read-only files that may already be present. You can undo any read-only file setting by attempting to type in that file. VS Code will automatically offer a suggestion to change that file's read-only status. However, if you then reload VS Code, that same file (if a non-workspace file) would again be marked as read-only. Or, if you leave and return to a file that is non-workspace, it will be remarked and locked as read-only by this extension. You can toggle or unset
Known IssuesIf you have more than 8 editor groups open - and one of those beyond 8 is the active group - this extension cannot properly refocus the active editor group after setting any non-workspace files to read-only. Unrelated to this extension, but if you want files to be marked and locked as read-only because they are read-only in the file system, then make sure you have this setting enabled: Release Notes
|