我正在做一个大项目,所以我经常使用代码折叠。我基本上有两种类型的代码:
1.
help.scroll = function() {
// some code
}2.
help.scroll = {
// some code
};所以Textmate会折叠第一个代码,但不会折叠第二个。
原始的折叠开始标记如下所示
foldingStartMarker = '^.*\bfunction\s*(\w+\s*)?\([^\)]*\)(\s*\{[^\}]*)?\s*$';
我想结束标记是可以的。
foldingStopMarker = '^\s*\}';
所以我的问题是-我如何修改"foldingStartMarker“,以便Textmate可以折叠这两个代码块。
提前进行thx
发布于 2012-08-27 17:23:46
不知道您的textmate版本,但以下内容可能与textmate 2.0(9283)中的版本相同:
{ foldingStartMarker = '\{\s*(//.*)?$|\[\s*(//.*)?$|\(\s*(//.*)?$';
foldingStopMarker = '^\s*\}|^\s*\]|^\s*\)';
}https://stackoverflow.com/questions/12139056
复制相似问题