<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body>
<div style="font-family:sans-serif"><div style="white-space:normal"><p dir="auto">On 2 Oct 2019, at 16:17, Martin Wilhelm Leidig wrote:</p>
<blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px"><p dir="auto">sometimes I open some text file just for reference or to copy something from it.  I’d like to open those read-only to avoid erronously introducing changes.  Could not find some easy way up to now.  Which bright red button in front of me did I miss?</p>
</blockquote><p dir="auto">There is no way to open a file as read-only.</p>
<p dir="auto">Partly for technical reasons, as we support running commands, and TextMate can’t be sure that a command won’t make changes to the file, but not allowing to run commands at all (for r/o files) would remove things like Git actions, word statistics, diff’ing, etc.</p>
<p dir="auto">But I’m currently doing some refactoring and will consider how feasible it is to at least have a read-only mode that disallows the built-in mutating actions; the problem here is only that such mode is rarely used so I don’t want hundreds of actions to have special code to test for read-only mode, hence only if the impact on code can be minimal would I want to support this.</p>
</div>
</div>
</body>
</html>