Small feature request for code folding
4 posts
• Page 1 of 1
Small feature request for code folding
I like the how code folding doesn’t fold every if statement and block of code with braces. There are some times where it would be nice to fold a large chunk of code that can’t be in its own function. #region blocks within C# come to mind, perhaps embedded with a php comment so it doesn't interfere with the php code processing?
- formula349
- Posts: 6
- Joined: August 26th, 2012, 8:50 pm
Re: Small feature request for code folding
Hello,
PHP Tools have this feature already. We use #region/#endregion syntax to achive custome collapsing. e.g
then you should be able to fold this block.
Cheers!
PHP Tools have this feature already. We use #region/#endregion syntax to achive custome collapsing. e.g
- Code: Select all
#region My region
if ($sayhello)
echo "Hello";
#endregion
then you should be able to fold this block.
Cheers!
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
Re: Small feature request for code folding
Great, that was fast!
Another thing that would be great is to able to parse and fold javascript in a string. Using the Yii framework, sometimes I'll add some javascript to a page using the code below.
I'd LOVE the ability to treat that block of javascript between the EOD marks with full syntax highlighting, folding, intellisense, etc.
Another thing that would be great is to able to parse and fold javascript in a string. Using the Yii framework, sometimes I'll add some javascript to a page using the code below.
- Code: Select all
$cs->registerScript('search', <<<EOD
$("table.green").on("click", "tr", function(event) {
var batchid = $(this).attr("batch");
getBatch(batchid);
});
function getBatch(id) {
$("table.green tr").removeClass('selected');
$("table.green tr[batch="+id+"]").addClass('selected');
$.ajax({
type: "POST",
url: "?getBatch=1",
dataType: "json",
data: { batchid: id },
success: function(data, textStatus, jqXHR) {
if(data.error) {
alert(data.error);
} else {
$("table.blue tbody").html(data.html);
}
},
failure: function(jqXHR, textStatus, errorThrown) {
alert(errorThrown);
},
complete: [$.qms.AjaxComplete, function(jqXHR, textStatus) {
if(textStatus != 'success') {
error = $.qms.logAjaxError(this, jqXHR, textStatus);
alert(error);
}
}]
});
}
EOD
);
I'd LOVE the ability to treat that block of javascript between the EOD marks with full syntax highlighting, folding, intellisense, etc.
- formula349
- Posts: 6
- Joined: August 26th, 2012, 8:50 pm
Re: Small feature request for code folding
That is interesting features and certainly possible, it would require some kind of language rocognization. And also preequisite feature viewtopic.php?f=21&t=755
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 37 guests