filevisual-studio-codereadonly

read only mode in vs code reset back to writable mode every time i reload the window


why every time I set a file as a read-only mode in vs code

reset Back to writable mode after I reload vs code window (using + command shift + P ==> file: set active editor read-only in session) or after I restart vs code

how can I make it permanent?

in pycharm usually stays on read-only mode after I restart pycharm


Solution

  • The keywords in the commands you're using to set read-only mode is "in session". The session being from the time that you open that VS Code instance/window to when it closes. When you open a new VS Code instance/window, that's a new session. If you want to set this stuff permanently, use the files.readonlyInclude setting and optional related settings. See also the globbing reference.