Read-only files
If a file is read-only, it is marked with the closed lock icon in the status bar. If a file is writable, it is marked with the open lock icon .
Library files in IntelliJ IDEA are normally read-only. For such files, you will not see the lock icon in the status bar. IntelliJ IDEA applies Reader mode to library files by default.
Toggle the read-only mode on and off
Open a file in the editor and click the lock icon / in the status bar.
Alternatively, select a file in the Project tool window (Alt+1), go to in the main menu and click Make file read-only.
If a read-only status is set by a version control system, it is suggested that you use IntelliJ IDEA version control integration features. For more information, refer to Version control.
Last modified: 31 October 2024