<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Looking for good C code formatter]]></title><description><![CDATA[<p dir="auto">I would like to know if there is a way to have Notepad++ properly reformat my C-code?</p>
<p dir="auto">I am aware of TextFX-&gt;TextFX Edit -&gt;Reindent C++ code but isn’t very good.</p>
<p dir="auto">Specifically it doesn’t handle if/for statements without { }. They end up not being indented correctly.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/22641/looking-for-good-c-code-formatter</link><generator>RSS for Node</generator><lastBuildDate>Sat, 14 Nov 2026 14:32:03 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/22641.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 26 Feb 2022 10:02:59 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Looking for good C code formatter on Sat, 05 Mar 2022 12:40:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bernhard-ege" aria-label="Profile: bernhard-ege">@<bdi>bernhard-ege</bdi></a> said in <a href="/post/74934">Looking for good C code formatter</a>:</p>
<blockquote>
<p dir="auto">I have a question about the afxres.h removal</p>
</blockquote>
<p dir="auto">I thought afxres.h was only included in paid for visual studio, not community. My bad if it is. It was failing for me and I know it generally isn’t needed and can simply be replaced with windows.h, but feel free to reject that pull request and just merge the other one which fixes the &gt;2G file issues going forward.</p>
<p dir="auto">If GitHub seem to merge the other one, it should be pretty easy to back it out. They were really only two changes, comment out AFXRes.h and add windows.h and the definition for IDC_STATIC</p>
<p dir="auto">Happy to help, thanks for supporting Notepad++ plugins!!</p>
<p dir="auto">Cheers.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74939</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74939</guid><dc:creator><![CDATA[Michael Vincent]]></dc:creator><pubDate>Sat, 05 Mar 2022 12:40:23 GMT</pubDate></item><item><title><![CDATA[Reply to Looking for good C code formatter on Sat, 05 Mar 2022 08:09:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/michael-vincent" aria-label="Profile: michael-vincent">@<bdi>michael-vincent</bdi></a> Well, now I managed to accept the pull request about afxres.h before waiting for you input. I don’t full understand why github did that as I was only looking at your other pull request. I am not comfortable using github when it does crap like that. :-(</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74935</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74935</guid><dc:creator><![CDATA[Bernhard Ege]]></dc:creator><pubDate>Sat, 05 Mar 2022 08:09:28 GMT</pubDate></item><item><title><![CDATA[Reply to Looking for good C code formatter on Sat, 05 Mar 2022 07:59:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/michael-vincent" aria-label="Profile: michael-vincent">@<bdi>michael-vincent</bdi></a> I have a question about the afxres.h removal. The project as it is can already be completely built by VS 2022 community edition as that is what I am using. You need to install “C++ MFC for latest v143 build tools (x86 &amp; x64)” using the Visual Studio Installer. Then it compiles without issues. In that light, should I accept that pull request?</p>
<p dir="auto">I have to admit currently not knowing what the afxres.h to windows.h change means for the project. It could be perfectly fine, but I guess there was a reason it was depending on afxres.h?</p>
<p dir="auto">The other pull request seems to be good changes.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74934</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74934</guid><dc:creator><![CDATA[Bernhard Ege]]></dc:creator><pubDate>Sat, 05 Mar 2022 07:59:23 GMT</pubDate></item><item><title><![CDATA[Reply to Looking for good C code formatter on Mon, 28 Feb 2022 16:25:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/michael-vincent" aria-label="Profile: michael-vincent">@<bdi>michael-vincent</bdi></a> said in <a href="/post/74655">Looking for good C code formatter</a>:</p>
<blockquote>
<p dir="auto">I’ve done the same with other abandoned plugins.<br />
You may want to have a read here:</p>
</blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bernhard-ege" aria-label="Profile: Bernhard-Ege">@<bdi>Bernhard-Ege</bdi></a></p>
<p dir="auto">I just submitted 2 pull requests:</p>
<ul>
<li>remove <code>afxres.h</code> dependency to build on community</li>
<li>updates for N++ 8.3 and Sci_Position (actually not that many changes - maybe 6 or so over 2 files).</li>
</ul>
<p dir="auto">Cheers.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74684</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74684</guid><dc:creator><![CDATA[Michael Vincent]]></dc:creator><pubDate>Mon, 28 Feb 2022 16:25:46 GMT</pubDate></item><item><title><![CDATA[Reply to Looking for good C code formatter on Sun, 27 Feb 2022 16:35:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bernhard-ege" aria-label="Profile: bernhard-ege">@<bdi>bernhard-ege</bdi></a> said in <a href="/post/74651">Looking for good C code formatter</a>:</p>
<blockquote>
<p dir="auto">I found the seemingly abandoned NppAStyle plugin for Notepad++ and decided to see if it could be made runnable with Notepad++ and the latest Visual Studio (2022)</p>
</blockquote>
<p dir="auto">I’ve done the same with other abandoned plugins.</p>
<p dir="auto">You may want to have a read here:</p>
<ul>
<li><a href="https://community.notepad-plus-plus.org/topic/22471/recompile-your-x64-plugins-with-new-header?_=1645979452746">Notepad++ &gt;=8.3  compatibilities</a></li>
<li><a href="https://npp-user-manual.org/docs/plugins/#rules-for-adding-your-plugins-into-list" rel="nofollow ugc">Plugin Admin inclusion</a></li>
</ul>
<p dir="auto">Thanks for keeping Notepad++ plugin ecosystem alive!</p>
<p dir="auto">Cheers.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74655</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74655</guid><dc:creator><![CDATA[Michael Vincent]]></dc:creator><pubDate>Sun, 27 Feb 2022 16:35:22 GMT</pubDate></item><item><title><![CDATA[Reply to Looking for good C code formatter on Sun, 27 Feb 2022 14:52:17 GMT]]></title><description><![CDATA[<p dir="auto">Thank you for the suggestions. I found the seemingly abandoned NppAStyle plugin for Notepad++ and decided to see if it could be made runnable with Notepad++ and the latest Visual Studio (2022). After some hours or trial and error, I did succeed and NppAStyle is now working for me (haven’t made a thorough test).</p>
<p dir="auto">If you want, you can download my code from here. It will compile with VS2022 but will require some optional packages installed via Visual Studio Installer (C++, C++).</p>
<p dir="auto"><a href="https://github.com/galmok/NppAStyle" rel="nofollow ugc">https://github.com/galmok/NppAStyle</a></p>
<p dir="auto">I haven’t modified documentation or uploaded a finished plugin (yet). I might do that, but a quick check didn’t reveal to me how I am supposed to do that and what the obligations for doing so is.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74651</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74651</guid><dc:creator><![CDATA[Bernhard Ege]]></dc:creator><pubDate>Sun, 27 Feb 2022 14:52:17 GMT</pubDate></item><item><title><![CDATA[Reply to Looking for good C code formatter on Sat, 26 Feb 2022 13:38:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dinkumoil" aria-label="Profile: dinkumoil">@<bdi>dinkumoil</bdi></a> said in <a href="/post/74633">Looking for good C code formatter</a>:</p>
<blockquote>
<p dir="auto">Another possible solution is &gt;&gt; AStyle &lt;&lt;</p>
</blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bernhard-ege" aria-label="Profile: Bernhard-Ege">@<bdi>Bernhard-Ege</bdi></a></p>
<p dir="auto">I second <code>astyle</code> - I don’t code in C/C++ much save for Notepad++ plugins and I’m not that picky about code formatting, but I do have <code>astyle</code> installed, shortcut’d in Notepad++ and use it now and again (if I remember) to format my code nicely, starndard-ly.</p>
<p dir="auto">My <code>.astylerc</code> if you like to get you started:</p>
<pre><code>style=allman
indent=spaces=4
indent-classes
indent-switches
indent-namespaces
indent-preproc-block
break-blocks
pad-oper
pad-comma
pad-header
pad-paren-in
align-pointer=middle
align-reference=name
break-one-line-headers
remove-braces
attach-return-type
attach-return-type-decl
convert-tabs
max-code-length=120
align-pointer=name
suffix=none
</code></pre>
<p dir="auto">Of course, your mileage may vary - there are a ton of optional configuration tuning parameters and pre-programmed styles to start from.  If you’re serious about it, give the <a href="http://astyle.sourceforge.net/" rel="nofollow ugc">AStyle Documentation</a> a read and tune it to your liking.</p>
<p dir="auto">Cheers.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74635</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74635</guid><dc:creator><![CDATA[Michael Vincent]]></dc:creator><pubDate>Sat, 26 Feb 2022 13:38:08 GMT</pubDate></item><item><title><![CDATA[Reply to Looking for good C code formatter on Sat, 26 Feb 2022 12:15:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bernhard-ege" aria-label="Profile: bernhard-ege">@<bdi>bernhard-ege</bdi></a></p>
<p dir="auto">Another possible solution is <a href="https://sourceforge.net/projects/astyle/" rel="nofollow ugc">&gt;&gt; AStyle &lt;&lt;</a>. It can be controlled via command line arguments, project specific option files or a global options file.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74633</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74633</guid><dc:creator><![CDATA[dinkumoil]]></dc:creator><pubDate>Sat, 26 Feb 2022 12:15:30 GMT</pubDate></item><item><title><![CDATA[Reply to Looking for good C code formatter on Sat, 26 Feb 2022 11:54:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bernhard-ege" aria-label="Profile: bernhard-ege">@<bdi>bernhard-ege</bdi></a></p>
<p dir="auto">Built-in - no.<br />
But if you happen to know of a standalone tool, you can always start it from the run menu and specify the filename as <code>$(FULL_CURRENT_PATH)</code>.<br />
Clang-format seems to do a good job. The easiest way to install it would be to download an archive from <a href="https://winlibs.com/" rel="nofollow ugc">here</a>, unzip it and use it.</p>
<p dir="auto">If you are brave, you can install my attempt to build a <a href="https://github.com/Ekopalypse/NppLspClient/releases/tag/v.0.0.8-alpha" rel="nofollow ugc">lsp-plugin</a>, set up a C lsp server (again, Clang is decent) and use its (plugin) built-in format call.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74632</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74632</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Sat, 26 Feb 2022 11:54:16 GMT</pubDate></item></channel></rss>