<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Fmt on Miek Gieben</title>
    <link>https://miek.nl/tags/fmt/</link>
    <description>Recent content in Fmt on Miek Gieben</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <copyright>© Copyright 2007-2024 Miek Gieben</copyright>
    <lastBuildDate>Wed, 19 Feb 2025 15:20:33 +0100</lastBuildDate>
    <atom:link href="https://miek.nl/tags/fmt/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Format Go HTML templates</title>
      <link>https://miek.nl/2025/february/19/format-go-html-templates/</link>
      <pubDate>Wed, 19 Feb 2025 15:20:33 +0100</pubDate>
      <guid>https://miek.nl/2025/february/19/format-go-html-templates/</guid>
      <description>&lt;p&gt;Because I was fed up with the lack of options (none), I write a tool that&#xA;can format Go HTML templates: you can find it &lt;a href=&#34;https://github.com/miekg/gotmplfmt&#34;&gt;here&lt;/a&gt;. Includes&#xA;screenshots!&lt;/p&gt;&#xA;&lt;p&gt;Formatting Go &lt;em&gt;text&lt;/em&gt; templates is pure madness, but the above code works well on HTML templates. If&#xA;have find issues or need more functionality open a PR against the repo.&lt;/p&gt;&#xA;&lt;p&gt;Have this in neovim:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-vim&#34; data-lang=&#34;vim&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;au&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;FileType&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;gohtmltmpl&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;command&lt;/span&gt;! &lt;span style=&#34;color:#a6e22e&#34;&gt;Fmt&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;silent&lt;/span&gt; %!&lt;span style=&#34;color:#a6e22e&#34;&gt;gotmplfmt&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;au&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;FileType&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;gohtmltmpl&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; &amp;amp;&lt;span style=&#34;color:#a6e22e&#34;&gt;l&lt;/span&gt;:&lt;span style=&#34;color:#a6e22e&#34;&gt;formatprg&lt;/span&gt;=&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;gotmplfmt&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;update-2025-05-31&#34;&gt;Update 2025-05-31&lt;/h2&gt;&#xA;&lt;p&gt;In my new neovim setup (with conform.lua) I have this:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
