Sublime Forum

Subl --read-only flag


Does subl have a read-only flag? I would like to be able to open files as read-only from the terminal:

subl --read-only some_file.txt

so I make sure I don’t accidentally change some files after opening them.

As an example, Julia can be configured to use an external command to edit source files (which should not be modified accidentally). I usually set the required environment variable to vim -R, which opens the file as read-only. It would be nice to be able to use sublime-text this way.



combined with

should do the trick