DEV Community

Cover image for New Useful Setting from VS Code
Jenuel Oras Ganawed
Jenuel Oras Ganawed

Posted on

New Useful Setting from VS Code

Copied Article From My Article Page: https://brojenuel.com/blog/New-Useful-Setting-from-VS-Code

Visual Studio Code is a lightweight but powerful source code editor which runs on your desktop and is available for Windows, macOS, and Linux.

So, what is the new update from this version that I think is very useful in Version 1.79.0?

Read-only Mode

In this version, they added a way to be able to mark files as read-only. With this, it will lock files to avoid modifying the file.

To be able to access this here are some ways. You can edit it from the setting for universal use, something like this.

vs code new setting

If you want to set settings as global settings, you can set it in the User Tab, but if just want to set the setting only for the workplace, set the setting in the Workplace tab.

Here are the setting you can modify for read-only files:

  • files.readonlyInclude - Paths or glob patterns to make a file read-only if matching.

  • files.readonlyExclude - Paths or glob patterns to skip files from being read-only when they match files.readonlyInclude.

  • files.readonlyFromPermissions - Whether a file that has no write-permissions on disk should be read-only.

Once you set up file or files on the files.readonlyInclude it will lock the file and will not let you edit that file.

This is really useful to avoid editing your protected files.

So, that's it! I hope you learn something small but useful! Adios! 🫰🙌

Top comments (0)