There are classes of files (generated files, tsc .js output [goto-source], log files, others) that are OS-writeable,
but are semantically intended to be 'readonly' (not editable);
Need a way, in configuration settings.json to indicate which files/directories (globs) are to be treated as readonly.
The associated PR interposes on TextEditorModel.isReadonly() to mark glob-designated files as readonly
providing a 99% solution for #4873 (6 yrs & 378 upvotes)
This first PR is without a 'mode' or interactive 'keyboard command'; (altho, yes: I love the feature in gnuemacs)
but users can quickly edit settings.json to change state of individual files,
or when sufficiently motivated, write an extension command to auto-edit settings.json.
Update: code to support interactive command to set or toggle readonly now available (see below)
Update: code to recognize and mark files that are chmod-readonly in the filesystem.
Also: #17670, #33823, #12227, #67622, #82748, #99322
There are classes of files (generated files, tsc .js output [goto-source], log files, others) that are OS-writeable,
but are semantically intended to be 'readonly' (not editable);
Need a way, in configuration settings.json to indicate which files/directories (globs) are to be treated as readonly.
The associated PR interposes on
TextEditorModel.isReadonly()to mark glob-designated files as readonlyproviding a 99% solution for #4873 (6 yrs & 378 upvotes)
This first PR is without a 'mode' or interactive 'keyboard command'; (altho, yes: I love the feature in gnuemacs)
but users can quickly edit settings.json to change state of individual files,
or when sufficiently motivated, write an extension command to auto-edit settings.json.
Update: code to support interactive command to set or toggle readonly now available (see below)
Update: code to recognize and mark files that are chmod-readonly in the filesystem.
Also: #17670, #33823, #12227, #67622, #82748, #99322