Textmate 的代码折叠 IF|FOREACH
希望有人能帮忙。
我是 textmate 的新用户,想要将代码折叠添加到 if|endif & foreach|endforeach 在 textmate 上。
的当前支持的折叠,
foldingStartMarker = '(/\*|\{\s*$|<<<HTML)';
foldingStopMarker = '(\*/|^\s*\}|^HTML)';
这些是我尝试过
foldingStartMarker = '(/\*|\{\s*$|<<<HTML|if)';
foldingStopMarker = '(\*/|^\s*\}|^HTML|endif)';
它启动了 if 的折叠,但未拾取停止标记。
还有其他人这样做过吗?
希望大家多多指教
Hope someone can help.
I am a new user to textmate and want to add code folding to if|endif & foreach|endforeach on textmate.
These are the current supported folds
foldingStartMarker = '(/\*|\{\s*$|<<<HTML)';
foldingStopMarker = '(\*/|^\s*\}|^HTML)';
I have tried
foldingStartMarker = '(/\*|\{\s*$|<<<HTML|if)';
foldingStopMarker = '(\*/|^\s*\}|^HTML|endif)';
Which starts the fold for an if but the stop Marker is not being picked up.
Has anyone else done this ?
Hope you can advise
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
更改 HTML 包而不是 PHP 包!
我已将
|array\s?(\s*$
更改为|array(\s*$
以获得数组折叠。这可能也适合您。我也尝试过这个:
|array\s*(\s*$
因为我想折叠 array( 以及 array ( 或array (。我不知道这是否是正确的语法,但它工作得很好!感谢 Chris Adams:
http://old.nabble.com/Any-chance-of-a-little-help-sorting-this-language-regexp-to-make-php-coding- less-painful-in-textmate--td30458020.html
Change The HTML bundle instead of the PHP bundle!
I've changed
|array\s?(\s*$
into|array(\s*$
to get array folding. This might work for you as well.I've also tried this:
|array\s*(\s*$
because I want to fold array( as well as array ( or array (. I don't know if this is exactly the right syntax, but it works perfectly!Thanks to Chris Adams:
http://old.nabble.com/Any-chance-of-a-little-help-sorting-this-language-regexp-to-make-php-coding-less-painful-in-textmate--td30458020.html