From tricon@me.com Wed Sep 24 23:36:23 2014 From: David Aaron Fendley To: textmate@lists.macromates.com Subject: [TxMt] Indenting Code & Markup Within Source Tags Date: Wed, 24 Sep 2014 16:36:16 -0700 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7889975895550894863==" --===============7889975895550894863== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable I would like code and markup inside certain tags to be indented. Currently, t= his occurs=E2=80=A6 Desired result: I=E2=80=99ve determined that this is because style, script, and other tags ar= e marked as `source.*`. If I rename these language constructs to something th= at doesn=E2=80=99t start with =E2=80=9Csource=E2=80=9D, then indentation work= s as expected. However, I do not want to throwaway the advantages of inheriti= ng from source. Does anyone know where I can begin looking to modify the `source` grammar so = that code within certain tags is indented? I have not had any luck with `incr= easeIndentPattern` (yet). --===============7889975895550894863==-- From tricon@me.com Wed Sep 24 23:37:30 2014 From: David Aaron Fendley To: textmate@lists.macromates.com Subject: [TxMt] Re: Indenting Code & Markup Within Source Tags Date: Wed, 24 Sep 2014 16:37:22 -0700 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4582600062458413138==" --===============4582600062458413138== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Formatting did not transfer. In the second example, I=E2=80=99d like the `bod= y` tag indented by two spaces. On Sep 24, 2014, at 4:36 PM, David Aaron Fendley wrote: > I would like code and markup inside certain tags to be indented. Currently,= this occurs=E2=80=A6 >=20 > >=20 > Desired result: >=20 > >=20 >=20 > I=E2=80=99ve determined that this is because style, script, and other tags = are marked as `source.*`. If I rename these language constructs to something = that doesn=E2=80=99t start with =E2=80=9Csource=E2=80=9D, then indentation wo= rks as expected. However, I do not want to throwaway the advantages of inheri= ting from source. >=20 > Does anyone know where I can begin looking to modify the `source` grammar s= o that code within certain tags is indented? I have not had any luck with `in= creaseIndentPattern` (yet). >=20 > _______________________________________________ > textmate mailing list > textmate(a)lists.macromates.com > http://lists.macromates.com/listinfo/textmate --===============4582600062458413138==-- From mailinglist@textmate.org Thu Oct 2 20:46:37 2014 From: Allan Odgaard To: textmate@lists.macromates.com Subject: [TxMt] Re: Indenting Code & Markup Within Source Tags Date: Thu, 02 Oct 2014 22:46:35 +0200 Message-ID: <0B4F9D75-F5AF-42FA-A429-491E12ED77FA@textmate.org> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4805591485357308906==" --===============4805591485357308906== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit On 25 Sep 2014, at 1:36, David Aaron Fendley wrote: > I would like code and markup inside certain tags to be indented […] > I’ve determined that this is because style, script, and other tags > are marked as `source.*` […] > > Does anyone know where I can begin looking to modify the `source` > grammar so that code within certain tags is indented? I have not had > any luck with `increaseIndentPattern` (yet). Your assertion is correct, with the new ability to see active settings it’s actually not that difficult to debug what goes on. Open a new HTML document and then ⌃⌘T (Bundles → Select Bundle Item…). Switch to Settings (⌘}) and type ‘increaseindent’. You’ll see there is just one item matching here, the one from the HTML bundle. You can select Edit to inspect its scope selector (text.html). Now type