# Code editor and formatting tips and tricks for GoHugo?

**URL:** <https://discourse.gohugo.io/t/code-editor-and-formatting-tips-and-tricks-for-gohugo/57102>\
**Category:** support\
**Created:** [May 8, 2026, 3:12am UTC](https://discourse.gohugo.io/t/code-editor-and-formatting-tips-and-tricks-for-gohugo/57102 "2026-05-08T03:12:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![user645235](https://avatars.discourse-cdn.com/v4/letter/u/df788c/32.png) [@user645235](https://discourse.gohugo.io/u/user645235)\
**Post date:** [May 8, 2026, 3:12am UTC](https://discourse.gohugo.io/t/code-editor-and-formatting-tips-and-tricks-for-gohugo/57102/1 "2026-05-08T03:12:07Z")

</div>

Hello, friends!

What is the recommended way to format HTML files that use GoHugo `{{ }}` template syntax? Also, which code editor do you use? (I usually use VS Code).

I checked the documentation for editor plugins: [Editor plugins](https://gohugo.io/tools/editors/) , and the recommended one is “Prettier for Go templates.” However, it seems to be abandoned.

I’m asking about formatting because the standard Prettier auto-formatted my code and broke my website due to extra spaces within shortcodes. Even my handwritten code, where I tried to use nested shortcodes, was very sensitive to spaces and tabs, it’s honestly quite annoying.

Is there a reliable auto-formatter for GoHugo? Or recommended code editor?

---

<div class="post-metadata">

**Author:** ![chrillek](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/chrillek/32/19797_2.png) [@chrillek](https://discourse.gohugo.io/u/chrillek)\
**Post date:** [May 8, 2026, 7:59am UTC](https://discourse.gohugo.io/t/code-editor-and-formatting-tips-and-tricks-for-gohugo/57102/2 "2026-05-08T07:59:02Z")

</div>

> [@New official Go template formatter for VS Code](https://discourse.gohugo.io/t/new-official-go-template-formatter-for-vs-code/57043/):
>
> See [gotmplfmt - Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=GoHugoIO.gotmplfmt) For those who don’t use VS Code, there’s a standalone CLI avalable at [GitHub - gohugoio/gotmplfmt: Work in progress. · GitHub](https://github.com/gohugoio/gotmplfmt/)

---

<div class="post-metadata">

**Author:** ![user645235](https://avatars.discourse-cdn.com/v4/letter/u/df788c/32.png) [@user645235](https://discourse.gohugo.io/u/user645235)\
**Post date:** [May 8, 2026, 4:19pm UTC](https://discourse.gohugo.io/t/code-editor-and-formatting-tips-and-tricks-for-gohugo/57102/3 "2026-05-08T16:19:35Z")

</div>

Thank you, I didn’t know about the announcement.

Why is the package above not mentioned in the documentation? [Editor plugins](https://gohugo.io/tools/editors/)

---

<div class="post-metadata">

**Author:** ![chrillek](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/chrillek/32/19797_2.png) [@chrillek](https://discourse.gohugo.io/u/chrillek)\
**Post date:** [May 8, 2026, 4:28pm UTC](https://discourse.gohugo.io/t/code-editor-and-formatting-tips-and-tricks-for-gohugo/57102/4 "2026-05-08T16:28:02Z")

</div>

> [@user645235](#):
>
> Why is the package above not mentioned in the documentation?

Probably because it is very new.

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [May 10, 2026, 4:28pm UTC](https://discourse.gohugo.io/t/code-editor-and-formatting-tips-and-tricks-for-gohugo/57102/5 "2026-05-10T16:28:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [May 17, 2026, 7:57pm UTC](https://discourse.gohugo.io/t/code-editor-and-formatting-tips-and-tricks-for-gohugo/57102/6 "2026-05-17T19:57:45Z")

</div>

> [@user645235](#):
>
> Why is the package above not mentioned in the documentation?

I’ve updated the documentation:  
[https://gohugo.io/tools/editors/#visual-studio-code](https://gohugo.io/tools/editors/#visual-studio-code)

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [May 17, 2026, 7:58pm UTC](https://discourse.gohugo.io/t/code-editor-and-formatting-tips-and-tricks-for-gohugo/57102/7 "2026-05-17T19:58:33Z")

</div>


