Skip to content

What do you think about Visual Studio Marketplace? We are looking for feedback from developers like you! Take the survey

| Marketplace
Sign in
Visual Studio Code>Other>Modify File WarningNew to Visual Studio Code? Get it now.

Modify File Warning

YuTengjing

|
47 installs
| (0) | Free
Useful when modify file under node_modules accidentally
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

modify-file-warning README

test

Useful when modify file under node_modules accidentally.

Settings

{
  // will give a warning is file match the includedFileGlobs
  "modifyFileWarning.includedFileGlobs": ["**/node_modules/**/*"],
  // you can using this setting to exclude files from includedFileGlobs
  "modifyFileWarning.excludedFileGlobs": [],
  // default is false, recommend to enable
  // will notify you to update your .nvmrc when version in .nvmrc in not the same in you shell environment
  "modifyFileWarning.enableNvmrcCheck": true
}

Why not automatically set file readonly but choose to warn?

VSCode doesn't provide an api to mark a opened editor readonly now, ref: Add read-only mode.

  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft