[TxMt] opening a file readonly

Gerd Knops gerti-textmate at bitart.com
Fri Jul 20 20:13:49 UTC 2007


Ideally an attempt to type (or otherwise modify) into a TextMate  
window for a read-only file should trigger a special 'Attempt to  
modify read-only file' command.

If no such command can be found (or all commands found decline to  
handle this situation) a panel should appear.

One reason to have such a command is Perforce (an SCM system) which  
manages checkout state by changing the 'w' flag of a file, eg you  
have to check out a file before you can modify it.

I could imagine other scenarios where such a script might be useful.

Gerd


On Jul 20, 2007, at 2:37 PM, Pete Siemsen wrote:

> Cliff,
>
> Ok, I see your point.  Perhaps a readonly mode isn't a feature  
> found in many editors, but it con be useful the reasons I've  
> described.
>
> I couldn't find anything about such a feature in the TextMate docs  
> or the book, so I assume that TextMate doesn't have the feature.   
> Is this email posted to this list sufficient to request it as a  
> future enhancement?
>
> -- Pete
>
>
>
> On Jul 19, 2007, at 4:52 PM, Cliff Pruitt wrote:
>
>> On Jul 19, 2007, at 1:11 PM, Pete Siemsen wrote:
>>
>>> Cliff, I think it's probably safe to call Emacs and vim "text  
>>> editors" :-)  It's very useful to view, seach and navigate a huge  
>>> config file with a text editor, and I prefer to browse readonly  
>>> files with the same tool that I use to edit files.  A few days  
>>> ago I wrote a TextMate language grammar for Juniper router  
>>> configs, so now TextMate does syntax highlighting and folding of  
>>> these config files.  It's surprisingly useful.
>>
>> Pete,
>> Yeah I know what you're saying & of course Emacs & vim are "text  
>> editors". :-)  But honestly how many "editors" of any kind have a  
>> read-only mode? (This is where someone emails me a list of like  
>> 3,000 read-only editors & I look like a jerk... happens every  
>> time.)  It's just a non-standard feature both happen to have. I  
>> don't discount that it's useful, I just wanted to pose the  
>> question that maybe something else would work.  I think it's just  
>> comparatively infrequent that the need to to completely prevent  
>> the buffer from changing at all.  Usually most people have smaller  
>> tasks & just "not saving" is sufficient even though that's not  
>> your need.
>>
>> - Cliff
>>
>>
>> _____________________________________________________________________ 
>> _
>> For new threads USE THIS: textmate at lists.macromates.com
>> (threading gets destroyed and the universe will collapse if you  
>> don't)
>> http://lists.macromates.com/mailman/listinfo/textmate
>
>
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate




More information about the textmate mailing list