<?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[MIB file (SNMP) syntax highlighting [User Defined Language]]]></title><description><![CDATA[<p dir="auto">I work on a lot of SNMP projects where I need to read MIB files. I could not find a UDL for MIB files anywhere on the net, but I found a few forum posts here and there where people request it. In the end I decided to make one for personal use, and figured i might as well share it.</p>
<p dir="auto">Download here: <a href="https://pastebin.com/ws3B9azU" rel="nofollow ugc">pastebin.com</a> (save as i.e. <code>userDefineLang-MIB.xml</code>, and place in directory <code>.\Notepad++\userDefineLangs</code>)</p>
<p dir="auto"><img src="/assets/uploads/files/1571207148904-2019-10-16-08_21_03-host-resources-mib-rfc2790.txt-notepad.png" alt="2019-10-16 08_21_03-HOST-RESOURCES-MIB-rfc2790.txt - Notepad++.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">It’s very rough around the edges, and does not do folding (I could not get it to work due to the complexity of delimiters in ASN.1). It’s purely for visual syntax highlighting to ease on-screen reading of MIB files.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/18374/mib-file-snmp-syntax-highlighting-user-defined-language</link><generator>RSS for Node</generator><lastBuildDate>Sat, 10 Oct 2026 05:37:02 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/18374.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 16 Oct 2019 06:39:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to MIB file (SNMP) syntax highlighting [User Defined Language] on Sun, 24 Apr 2022 08:41:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rdipardo" aria-label="Profile: rdipardo">@<bdi>rdipardo</bdi></a> said in <a href="/post/76292">MIB file (SNMP) syntax highlighting [User Defined Language]</a>:</p>
<blockquote>
<p dir="auto">This definitely won’t work:</p>
</blockquote>
<p dir="auto">That is why I said “test the lexing quality with old NPP version”.<br />
if there is interest, I may invest the time. Or since the source code is available then maybe someone else will take over.</p>
<p dir="auto">If everyone is happy with UDL, great.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76293</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76293</guid><dc:creator><![CDATA[gstavi]]></dc:creator><pubDate>Sun, 24 Apr 2022 08:41:17 GMT</pubDate></item><item><title><![CDATA[Reply to MIB file (SNMP) syntax highlighting [User Defined Language] on Sun, 24 Apr 2022 08:26:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gstavi" aria-label="Profile: gstavi">@<bdi>gstavi</bdi></a>,</p>
<blockquote>
<p dir="auto">Haven’t used it for a while, it is possible that it was broken in latest NPP version</p>
</blockquote>
<p dir="auto"><a href="https://github.com/gstavi/npp/blob/51d208f7a06ac3f6d39e1de4132c79dd678acbfc/lexamples/LexMib.cpp#L1276" rel="nofollow ugc">This</a> definitely won’t work:</p>
<pre><code class="language-cpp">ILexer *LexerMib::LexerFactoryMib()
{
  return new LexerMib;
}

ILexer *lexamples_create_mib_lexer()
{
  return LexerMib::LexerFactoryMib();
}
</code></pre>
<p dir="auto">As other plugin developers <a href="https://community.notepad-plus-plus.org/topic/22866/make-external-lexer-plugin-work-with-v8-4">are finding out</a>, Scintilla 5 moved the lexer interface to <a href="https://www.scintilla.org/Scintilla5Migration.html" rel="nofollow ugc">the Lexilla library</a>. The new API is ultimately better for external lexers — basically, <em>every</em> lexer is external now — once you get the hang of it.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76292</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76292</guid><dc:creator><![CDATA[rdipardo]]></dc:creator><pubDate>Sun, 24 Apr 2022 08:26:29 GMT</pubDate></item><item><title><![CDATA[Reply to MIB file (SNMP) syntax highlighting [User Defined Language] on Sun, 24 Apr 2022 07:28:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/unknown14725" aria-label="Profile: unknown14725">@<bdi>unknown14725</bdi></a><br />
Long ago I worked with MIB files for ~1 year and wrote the <a href="https://sourceforge.net/projects/lexamples" rel="nofollow ugc">lexamples</a> plugin that provides MIB files and GNU Makefiles lexing.<br />
This is an external DLL lexer, not user defined language.</p>
<p dir="auto">I used it for writing GNU Makefiles for years. I haven’t touched MIB for 7 years.</p>
<p dir="auto">Haven’t used it for a while, it is possible that it was broken in latest NPP version but it should be possible to test the lexing quality with old NPP version. If the lexing is superior we could consider porting it to newer NPP version.</p>
<p dir="auto"><a href="https://github.com/gstavi/npp/tree/master/lexamples" rel="nofollow ugc">Source code</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/76291</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76291</guid><dc:creator><![CDATA[gstavi]]></dc:creator><pubDate>Sun, 24 Apr 2022 07:28:57 GMT</pubDate></item><item><title><![CDATA[Reply to MIB file (SNMP) syntax highlighting [User Defined Language] on Fri, 22 Apr 2022 16:56:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/vincent-duvernet" aria-label="Profile: vincent-duvernet">@<bdi>vincent-duvernet</bdi></a> said in <a href="/post/53187">MIB file (SNMP) syntax highlighting [User Defined Language]</a>:</p>
<blockquote>
<p dir="auto">wonderful :) I was looking for MIB/SNMP compatibility today :)</p>
<p dir="auto">But the BackColor is not working associated to DarkTheme :</p>
</blockquote>
<p dir="auto">Just stumbled on this UDL but you’re right it doesn’t come up very well in Dark Mode.</p>
<p dir="auto">So I tweaked it for DM here: at pastebin, with the URL: zC7fCauP</p>
<p dir="auto">(Sorry for the lack of a hyperlink, spam filters were blocking me.)</p>
<p dir="auto">Hope it can be useful.<br />
Cheers</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76256</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76256</guid><dc:creator><![CDATA[Joshua From Vietnam]]></dc:creator><pubDate>Fri, 22 Apr 2022 16:56:32 GMT</pubDate></item><item><title><![CDATA[Reply to MIB file (SNMP) syntax highlighting [User Defined Language] on Tue, 28 Apr 2020 21:44:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/vincent-duvernet" aria-label="Profile: Vincent-Duvernet">@<bdi>Vincent-Duvernet</bdi></a> said in <a href="/post/53187">MIB file (SNMP) syntax highlighting [User Defined Language]</a>:</p>
<blockquote>
<p dir="auto">wonderful :) I was looking for MIB/SNMP compatibility today :)</p>
</blockquote>
<p dir="auto">You may also want it in the function list.  I’ve added in my <code>$(NPP_INSTALL_DIR)/functionList.xml</code> file:</p>
<pre><code> &lt;association id="asn1_syntax" langID="65"  /&gt;
</code></pre>
<p dir="auto">then down in the parsers section:</p>
<pre><code>&lt;!-- ============== [ ASN.1 ] --&gt;

&lt;parser
	displayName="ASN.1"
	id         ="asn1_syntax"
	commentExpr="(?x)
					(?m-s:\-\-.*$)    # Single Line Comment
				"
&gt;

	&lt;classRange mainExpr="(?:^\s*\w+\s+::=\s+[\w-]+\s*)"&gt;
		&lt;className&gt;
			&lt;nameExpr expr="(?:\s*)\K[\w]+"/&gt;
		&lt;/className&gt;
		&lt;function
			mainExpr="(?:^\s*\w+\s+)"&gt;
			&lt;functionName&gt;
				&lt;funcNameExpr expr="(?:\s*)\K[\w]+"/&gt;
			&lt;/functionName&gt;
		&lt;/function&gt;
	&lt;/classRange&gt;
	&lt;function
		mainExpr="(?:^\s*\w+\s+OBJECT-\w+[\n\s]*)"&gt;
		&lt;functionName&gt;
			&lt;nameExpr expr="(?:\s*)\K[\w]+"/&gt;
		&lt;/functionName&gt;
	&lt;/function&gt;
&lt;/parser&gt;
</code></pre>
<p dir="auto">Cheers.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/53219</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/53219</guid><dc:creator><![CDATA[Michael Vincent]]></dc:creator><pubDate>Tue, 28 Apr 2020 21:44:02 GMT</pubDate></item><item><title><![CDATA[Reply to MIB file (SNMP) syntax highlighting [User Defined Language] on Tue, 28 Apr 2020 13:45:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/vincent-duvernet" aria-label="Profile: Vincent-Duvernet">@<bdi>Vincent-Duvernet</bdi></a> said in <a href="/post/53187">MIB file (SNMP) syntax highlighting [User Defined Language]</a>:</p>
<blockquote>
<p dir="auto">wonderful :) I was looking for MIB/SNMP compatibility today :)</p>
</blockquote>
<p dir="auto">Why use a UDL?  The default theme already has ASN.1 and that can be copied into (and adjusted for color) into your preferred theme (as <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> mentions).  I did this for Obsidian Theme which I use exclusively.</p>
<p dir="auto">You may need to associate your MIB extension with ASN.1 for Notepad++ to recognize the file on opening:</p>
<p dir="auto">Settings =&gt; Style Configurator… =&gt;</p>
<p dir="auto"><img src="/assets/uploads/files/1588081518437-3540c3c6-4fb9-4c15-a9c3-dccd5f2c4d6e-image.png" alt="3540c3c6-4fb9-4c15-a9c3-dccd5f2c4d6e-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Cheers.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/53199</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/53199</guid><dc:creator><![CDATA[Michael Vincent]]></dc:creator><pubDate>Tue, 28 Apr 2020 13:45:29 GMT</pubDate></item><item><title><![CDATA[Reply to MIB file (SNMP) syntax highlighting [User Defined Language] on Tue, 28 Apr 2020 13:36:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/vincent-duvernet" aria-label="Profile: Vincent-Duvernet">@<bdi>Vincent-Duvernet</bdi></a> said in <a href="/post/53187">MIB file (SNMP) syntax highlighting [User Defined Language]</a>:</p>
<blockquote>
<p dir="auto">But the BackColor is not working associated to DarkTheme</p>
</blockquote>
<p dir="auto">User Defined Languages do not honor themes: if you change your theme, it does <em>not</em> change the coloring for the UDL syntax highlighter.  You can use <strong>Language &gt; User Defined Language &gt; Define Your Language…</strong> to change the colors for your specific UDL.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/53198</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/53198</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 28 Apr 2020 13:36:13 GMT</pubDate></item><item><title><![CDATA[Reply to MIB file (SNMP) syntax highlighting [User Defined Language] on Tue, 28 Apr 2020 12:13:23 GMT]]></title><description><![CDATA[<p dir="auto">wonderful :) I was looking for MIB/SNMP compatibility today :)</p>
<p dir="auto">But the BackColor is not working associated to DarkTheme :<br />
[<a href="https://github.com/Ludomancer/VS2015-Dark-Npp" rel="nofollow ugc">https://github.com/Ludomancer/VS2015-Dark-Npp</a>](link url)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/53187</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/53187</guid><dc:creator><![CDATA[Vincent Duvernet]]></dc:creator><pubDate>Tue, 28 Apr 2020 12:13:23 GMT</pubDate></item></channel></rss>