Sublime Forum

Read only files

#1

Hi i am really liking Sublime, it really really needs a Find in files :frowning:

What i really want to know, is how can i make it not allow changes to files that are read only. I want it to beep or something so that i know i need to check it out from P4 before making changes.

Any suggestions?

0 Likes

#2

So there is no default option to prevent editing a file that is read only?
:neutral_face:

0 Likes

#3

I don know some python, but haven’t figured out how to write stuff that change the editors behavior yet.
Is there a way to put additional functionality to a given file type?

0 Likes

#4

correct, if the file attribute on disk is set for read only then i can’t change the text buffer.

0 Likes

#5

[quote=“sublimator”]Here’s something to tie you over:

This will set the ReadOnly status to that of on disk, every time you activate
the tab (which includes of onLoad)

So if you set it writable, just switch to another tab and back again.
[/quote]

Cool, that works awesome.

I assume there is no sound support in sublime yet?

Is there a easy API for popping up a confirmation box?

0 Likes

#6

i think you better begin with reading: sublimetext.com/docs/api-reference

0 Likes

#7

Ahhh RTFM!

Right o Sir.

One thing i noticed that the OnModified event doesn’t trigger for a readonly buffer. Would it be possible to get a OnMoifiedFailed event.

What i want to do is if you try typing on a read-only buffer it asks if you want to Do Nothing, Check out from P4 or make writable.

just need to detect that you tried to change something that you can’t change.

0 Likes