There is no default shortcut for this action. In the editor, place the caret at the characters you want to swap. For more information, refer to Version control. If a read-only status is set by a version control system, it's suggested that you use DataGrip version control integration features. Go to File | File Properties | Make File Read-only or File | File Properties | Make File Writable. Open file in the editor or select it in the Project tool window.
If a file is writable, it is marked with the open lock icon in the Status bar. If a file is read-only, it is marked with the closed lock icon in the status bar, in its editor tab, or in the Files tool window.