Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to mark any file outside current workspace read-only #184698

Closed
ortk95 opened this issue Jun 9, 2023 · 6 comments
Closed

Add option to mark any file outside current workspace read-only #184698

ortk95 opened this issue Jun 9, 2023 · 6 comments
Labels
feature-request Request for new features or functionality file-io File I/O

Comments

@ortk95
Copy link

ortk95 commented Jun 9, 2023

As an extension of #4873, it would be great if there was an option to automatically mark any file which is not in the current workspace directory as read only. I sometimes end up opening files located elsewhere to view their contents (e.g. the source code for installed python modules or scripts in other directories), but I never actually want to edit these other files.

It may be possible to already create a generic filter like this with files.readonlyInclude and files.readonlyExclude, but I haven't found a combination of glob patterns that works yet.

@lramos15 lramos15 assigned bpasero and unassigned lramos15 Jun 9, 2023
@bpasero bpasero added feature-request Request for new features or functionality file-io File I/O labels Jun 10, 2023
@bpasero bpasero removed their assignment Jun 10, 2023
@vscodenpa vscodenpa added this to the Backlog Candidates milestone Jun 10, 2023
@vscodenpa
Copy link

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@starball5
Copy link

starball5 commented Jun 29, 2023

Related on Stack Overflow: How to prevent VSCode from changing files that do not belong to the project?

@bpasero Is there supposed to be a way to achieve this using the new read-only feature from 1.79? I tried a little bit but didn't have success:

"files.readonlyInclude": {
   "*": true,
   //"${workspaceFolder}": false,
},
"files.readonlyExclude": {
   "${workspaceFolder}/**/*": true,
}

@bpasero
Copy link
Member

bpasero commented Jun 29, 2023

No, there is no variables support in settings as far as I know.

@starball5
Copy link

Posted an imperfect solution over at the Stack Overflow Q&A: https://stackoverflow.com/a/76585490/11107541

@vscodenpa
Copy link

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@vscodenpa
Copy link

🙁 In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale Aug 10, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality file-io File I/O
Projects
None yet
Development

No branches or pull requests

5 participants