# Template formatter

**URL:** <https://discourse.gohugo.io/t/template-formatter/27829>\
**Category:** Announcements\
**Created:** [August 25, 2020, 6:55pm UTC](https://discourse.gohugo.io/t/template-formatter/27829 "2020-08-25T18:55:45Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [August 25, 2020, 6:55pm UTC](https://discourse.gohugo.io/t/template-formatter/27829/1 "2020-08-25T18:55:46Z")

</div>

A little premature and just shows how easily distracted I get … A thread on Twitter sent me down the long and windy road of writing a Go template formatter (with VS code extension) (for HTML templates only, for now) …

Still a little unfinished and not something you should/could install … yet.

> <https://twitter.com/bepsays/status/1298332096084279299?s=20>

---

<div class="post-metadata">

**Author:** ![sjardim](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/sjardim/32/5361_2.png) [@sjardim](https://discourse.gohugo.io/u/sjardim)\
**Post date:** [August 25, 2020, 7:44pm UTC](https://discourse.gohugo.io/t/template-formatter/27829/2 "2020-08-25T19:44:52Z")

</div>

This looks super useful, Bep!!

---

<div class="post-metadata">

**Author:** ![idarek](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/idarek/32/26229_2.png) [@idarek](https://discourse.gohugo.io/u/idarek)\
**Post date:** [August 25, 2020, 8:45pm UTC](https://discourse.gohugo.io/t/template-formatter/27829/3 "2020-08-25T20:45:47Z")

</div>

Yep, usefull!

---

<div class="post-metadata">

**Author:** ![Deeblock](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/deeblock/32/12221_2.png) [@Deeblock](https://discourse.gohugo.io/u/Deeblock)\
**Post date:** [August 26, 2020, 5:32pm UTC](https://discourse.gohugo.io/t/template-formatter/27829/4 "2020-08-26T17:32:53Z")

</div>

Yes please, been needing a formatter in vscode that works with Hugo templates!

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [August 27, 2020, 8:27pm UTC](https://discourse.gohugo.io/t/template-formatter/27829/5 "2020-08-27T20:27:45Z")

</div>

Just a quick note that I think it’s going to be “not too long” before I post this to the public (mid next week?). I’m using it myself now, and it’s mostly working great (and I have been using it on some fairly complex/big templates). Thought I would take it to a place where I’m happy with the output before I push it to the world and start to get complains about “what? spaces and not tabs?”.

Oh, and looking at the before/after in these template formattings, I ask myself who I could do without this for so long …

---

<div class="post-metadata">

**Author:** ![yaaax](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/yaaax/32/14897_2.png) [@yaaax](https://discourse.gohugo.io/u/yaaax)\
**Post date:** [September 22, 2020, 10:24pm UTC](https://discourse.gohugo.io/t/template-formatter/27829/7 "2020-09-22T22:24:20Z")

</div>

Can’t wait! Thanks for developing this, it will be super useful.

---

<div class="post-metadata">

**Author:** ![skyfaller](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/skyfaller/32/4620_2.png) [@skyfaller](https://discourse.gohugo.io/u/skyfaller)\
**Post date:** [September 28, 2020, 8:00pm UTC](https://discourse.gohugo.io/t/template-formatter/27829/8 "2020-09-28T20:00:57Z")

</div>

This would be fantastic! Would it be difficult to include CSS templates as well?

---

<div class="post-metadata">

**Author:** ![Zachary\_Bayoff](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/zachary_bayoff/32/8248_2.png) [@Zachary\_Bayoff](https://discourse.gohugo.io/u/Zachary_Bayoff)\
**Post date:** [October 23, 2020, 3:00pm UTC](https://discourse.gohugo.io/t/template-formatter/27829/9 "2020-10-23T15:00:22Z")

</div>

@bep I’ve been looking for a feature like this since I started using hugo! This is great. Thank you for putting in the time to develop. Any update on when it will be released to the public?

---

<div class="post-metadata">

**Author:** ![iaeiou](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/iaeiou/32/15332_2.png) [@iaeiou](https://discourse.gohugo.io/u/iaeiou)\
**Post date:** [November 30, 2021, 12:32am UTC](https://discourse.gohugo.io/t/template-formatter/27829/10 "2021-11-30T00:32:26Z")

</div>

Any update on this @bep?  
This formatter would be super useful!

---

<div class="post-metadata">

**Author:** ![yaaax](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/yaaax/32/14897_2.png) [@yaaax](https://discourse.gohugo.io/u/yaaax)\
**Post date:** [April 29, 2022, 10:14am UTC](https://discourse.gohugo.io/t/template-formatter/27829/11 "2022-04-29T10:14:57Z")

</div>

Still fighting with formatting markdown files with shortcodes 😢  
Unfortunately I don’t have any skills developing this kind of tool…  
Any tip welcome ! (and I’m willing to actually give tips to some dev for that !)

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [April 29, 2022, 7:45pm UTC](https://discourse.gohugo.io/t/template-formatter/27829/12 "2022-04-29T19:45:23Z")

</div>

[https://discourse.gohugo.io/t/formatter-for-go-templates/38403/2](https://discourse.gohugo.io/t/formatter-for-go-templates/38403/2)

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [May 1, 2022, 7:46pm UTC](https://discourse.gohugo.io/t/template-formatter/27829/13 "2022-05-01T19:46:18Z")

</div>

Closed on May 1, 2022, 7:46pm UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
