Sublime Forum

Toggle Read Only of a Buffer

#1

Hi all.

I’ve implemented an easy plugin for Sublime Text 2. It’s my first plugin and I hope, that it helps some people who haven’t implemented it for themself.

It’s called toggle-readonly and allows you to toggle the active view/buffer as readonly. It doesn’t change the file parameters in the file system it only changes the read only property of the buffer.

So it’s a very small and handy plugin which calls:

sublime.View.set_read_only(value)

You can set this with a mouse-click on the buffer-tab, the open file menu and on the edit-area of the buffer itself.

Unfortunetaly it’s not available via the Package Control yet, I’ll change that later…

You can download it here: https://github.com/AxxL/sublime-toggle-readonly

What I would like to have is a change of the buffer-tab. Some change of the buffer-text or a change of the color of the tab. Maybe later. Credits: Some forum post where this topic was discussed. g.

Have fun.

0 Likes

#2

Hi, dowloaded this via package manager.
It doe snot seem to work, I can still edit my buffers after I click on toggle.
Moreover the toggle readonly option never gets checked.

0 Likes

#3

Sorry for the huge delay.

I didn’t manage yet to bring this package to the Package Control. So please download it here: github.com/AxxL/sublime-toggle-readonly

Thank you.
AxxL

0 Likes

#4

Hi,

OK, I think I installed this : github.com/reflog/toggle-readonly which does not work.

I installed from github archive, it works :smile:

Thanks

0 Likes