Home Download Buy Blog Forum Support

Folded code lock / delete prevention

Folded code lock / delete prevention

Postby jakub on Sat Oct 27, 2012 10:20 am

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?
jakub
 
Posts: 1
Joined: Sat Oct 27, 2012 10:13 am

Re: Folded code lock / delete prevention

Postby DanielV on Sat Oct 27, 2012 10:57 am

+1 (Wait plus more, this is one heck of a great idea!!)
DanielV
 
Posts: 11
Joined: Sat Oct 20, 2012 8:38 pm

Re: Folded code lock / delete prevention

Postby frou on Sat Oct 27, 2012 9:08 pm

Never thought of that, but it's a brilliant idea. I'd use folding more if such a setting was available.
frou
 
Posts: 49
Joined: Sun Jul 31, 2011 11:26 am

Re: Folded code lock / delete prevention

Postby sfranky on Tue Apr 02, 2013 6:20 pm

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 !!!
sfranky
 
Posts: 96
Joined: Mon Oct 19, 2009 10:06 pm

Re: Folded code lock / delete prevention

Postby quodlibet on Tue Apr 02, 2013 7:38 pm

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

Anyone care to throw together a plugin? :D
quodlibet
 
Posts: 508
Joined: Sat Jun 18, 2011 5:53 pm

Re: Folded code lock / delete prevention

Postby LONGMAN on Wed Apr 03, 2013 7:35 am

+111
AutoBackups: ST2 / ST3
CodeFormatter: ST2 / ST3
StringUtilities: ST2 / ST3
LONGMAN
 
Posts: 68
Joined: Mon Nov 26, 2012 5:03 pm
Location: Tbilisi, Georgia


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 19 guests