Sublime Forum

Folded code lock / delete prevention

#1

As you may know, one of the weak points of code folding in sublime is that, once collapsed, it is represented by a single yellow character, which could be easily deleted by mistake.

Is there any way (besides being really careful when deleting stuff), to lock the folded code, or disable backspace on that yellow representation of the collapsed lines? Or maybe there’s a plugin for that which I just haven’t discovered?

If there’s no already existing solution, does anybody have an idea how this problem could be approached / solved when writing a plugin for that?

0 Likes

#2

+1 (Wait plus more, this is one heck of a great idea!!)

0 Likes

#3

Never thought of that, but it’s a brilliant idea. I’d use folding more if such a setting was available.

0 Likes

#4

not to mention it would be very useful when you want to search within the file but NOT within the commented-out areas that you have folded (so as not to be disturbed by them).
My searches keep unfolding the numerous folds I make in my code and it is driving me mad !!!

0 Likes

#5

I have wondered if this is:
a) possible
b) practical

Anyone care to throw together a plugin? :smiley:

0 Likes

#6

+111

0 Likes