textmate / shellscript.tmbundle

TextMate support for ShellScript
43 stars 29 forks source link

Folding on "if" in Comments #47

Open timkite opened 6 years ago

timkite commented 6 years ago

Currently, if you put the word "if" in a comment with the Shell Script grammar active, TextMate will erroneously put a code folding start mark at that comment. This has an easy fix which I think is correct and doesn't seem to have any nasty side-effects.

Current Settings -> Folding: { foldingStartMarker = '\b(if|case)\b|(\{|\b(do)\b)$'; foldingStopMarker = '^\s*(\}|(done|fi|esac)\b)'; }

Proposed Settings-> Folding: { foldingStartMarker = '^\s*\b(if|case)\b|(\{|\b(do)\b)$'; foldingStopMarker = '^\s*(\}|(done|fi|esac)\b)'; }