This is a repository for some of my varied snippets on Notepad++ knowledge. (If bluehost's mojomarketplace was more user friendly for "playing with" an install, then deleting it again, I might have played with their wiki choices until I found one to my liking... but since I couldn't uninstall it through the interface (I ended up just deleting the subdir it created), I decided simpler was better.

most of these snippets are presented in their raw Markdown, for easy pasting into the Notepad++ forums.

Here are various snippets to paste in the forums when helping others with specific topics. (Should probably get its own page, eventually.)

ISSUES

## Blank Areas / Large Borders

These "blank areas" are a known issue. See links below Some users have had luck with switching to Administrator mode, or rebooting, or updating video drivers, so trying that may help you. Official bug reports: * https://github.com/notepad-plus-plus/notepad-plus-plus/issues/9717 (active) * https://github.com/notepad-plus-plus/notepad-plus-plus/issues/9760 (marked as duplicate) * https://github.com/notepad-plus-plus/notepad-plus-plus/issues/10258 (marked as duplicate) Multiple mentions in the forum * https://community.notepad-plus-plus.org/post/70064 (report in v8.1.5 release topic) * https://community.notepad-plus-plus.org/topic/21875/help-with-weird-startup-of-npp-showing-a-debug-window-and-broken-panels * https://community.notepad-plus-plus.org/topic/21742/distorted-display-of-the-notepad-window * https://community.notepad-plus-plus.org/topic/21366/window-view-problem * https://community.notepad-plus-plus.org/topic/21154/panel-layout-corruption-after-power-loss * https://community.notepad-plus-plus.org/topic/21128/disintegrated-ui * https://community.notepad-plus-plus.org/topic/21056/window-layout-problems-after-update (video drivers + reboot) * https://community.notepad-plus-plus.org/topic/21053/layout-breaks-after-a-few-days * https://community.notepad-plus-plus.org/topic/20996/tabs-are-floating-after-upgrade-to-7-9-5 (video drivers + reboot)

mod edit

\---

_moderator added code markdown around text; please don't forget to [use the `</>` button to mark example text as "code"](https://community.notepad-plus-plus.org/topic/21925/faq-desk-formatting-forum-posts) so that characters don't get changed by the forum_

direct write

It appears that you want DirectWrite enabled; see [Settings > Preferences > MISC](https://npp-user-manual.org/docs/preferences/#misc:~:text=DirectWrite%20will%20help%20in%20displaying%20characters). As the Preferences dialog says, turning it on "may improve rendering special characters".

FAQ

[FAQ Desk](https://community.notepad-plus-plus.org/category/7/faq)

["FAQ: What is `%AppData%`"](https://community.notepad-plus-plus.org/topic/15740/faq-desk-what-is-appdata)

[🛈](https://community.notepad-plus-plus.org/topic/15740/faq-desk-what-is-appdata "FAQ: What is %AppData%?")

["FAQ: Feature Request"](https://community.notepad-plus-plus.org/topic/15741/faq-desk-feature-request-or-bug-report)

["FAQ: Bug Report"](https://community.notepad-plus-plus.org/topic/15741/faq-desk-feature-request-or-bug-report)

["FAQ: Periodic Backup vs. AutoSave Plugin"](https://community.notepad-plus-plus.org/topic/21782/faq-desk-periodic-backup-vs-autosave-plugin)

Not A Regression

Your comment is not specific to this release.

The "vX.Y.Z Release" topics like this one are specific to changes made in one release: comments here should focus on a feature that was added or intentionally changed in this version, or on a "regression" (something that used to work broke due to a change in this version)

If you have a general question about Notepad++ that isn't specific to this version, please post in [Help Wanted](https://community.notepad-plus-plus.org/category/4/help-wanted)

If you have a general feature request, we have a ["Feature Request FAQ"](https://community.notepad-plus-plus.org/topic/15741/faq-desk-feature-request-or-bug-report)

Enhance lexer / UDL

You can add extra highlighting to a builtin lexer (like the HTML lexer) or to a User Defined Language (UDL) using regexes via the [EnhanceAnyLexer plugin](https://github.com/Ekopalypse/EnhanceAnyLexer/): download the [latest here](https://github.com/Ekopalypse/EnhanceAnyLexer/releases/latest).

PS: Docs

\---

*Notepad++ Documentation: check the official docs at npp-user-manual.org. If something is missing or wrong there, see if it's been fixed in the [repository](https://github.com/notepad-plus-plus/npp-usermanual/) already, but hasn't been released to the website yet. If it's not there, feel free to [create an issue](https://github.com/notepad-plus-plus/npp-usermanual/issues/) and wait patiently for it to be improved and released.*

PS: regex

\----

### Useful References * [Please Read Before Posting](https://community.notepad-plus-plus.org/topic/21965/please-read-before-posting) * [Template for Search/Replace Questions](https://community.notepad-plus-plus.org/topic/22022/template-for-search-replace-questions) * [Formatting Forum Posts](https://community.notepad-plus-plus.org/topic/21925/faq-desk-formatting-forum-posts) * [Notepad++ Online User Manual: Searching/Regex](https://npp-user-manual.org/docs/searching/#regular-expressions) * [FAQ: Where to find other regular expressions (regex) documentation](https://community.notepad-plus-plus.org/topic/15765/faq-desk-where-to-find-regular-expressions-regex-documentation)

\----

_**Please note**: This Community Forum is not a data transformation service; you should not expect to be able to always say "I have data like X and want it to look like Y" and have us do all the work for you. If you are new to the Forum, and new to regular expressions, we will often give help on the first one or two data-transformation questions, especially if they are well-asked and you show a willingness to learn; and we will point you to the documentation where you can learn how to do the data transformations for yourself in the future. But if you repeatedly ask us to do your work for you, you will find that the patience of usually-helpful Community members wears thin. The best way to learn regular expressions is by experimenting with them yourself, and getting a feel for how they work; having us spoon-feed you the answers without you putting in the effort doesn't help you in the long term and is uninteresting and annoying for us._

\----

_**Please note**: This Community Forum is not a data transformation or free-code-writing service; you should not expect to be able to always say "I have data like X and want it to look like Y" and have us do all the work for you. If you are new to the Forum, and the problem can be easily solved with a regular expression, we'll likely give you a start on that. And if it requires scripting (more complex logic than can easily be done in a regular expression), we will let you know. If your problem catches the interest of one of the regulars, that person may even provide an example script that may be helpful; often times, we might even ask you to search the forum for a particular term, because that term will likely help you find a script that already implements something similar. Whether it's a previously-written script, or whether one of us hacks something up for you specifically, it won't always exactly match your problem, but it's at least a starting point for you to work from. At that point, you are expected to take the lead, and make any changes to the example that are necessary to convert it from what was provided to something that meets you exact needs. This forum is focused on Notepad++; while you may _want_ to use Notepad++ for the implementation, text editors aren't always the right tool for complex text transformation tasks: since you are seeing this boilerplate in my reply, it means that I believe that it's essentially a generic programming challenge, which is off topic for a Notepad++\-specific forum._

It Works For Me

Sorry. I could not reproduce it. It works for me.

\----

*Why such a short reply? Because you didn't tell us enough to be able to reproduce your problem, or because I tried what you described and got the results I expected. If you [give us more information](/topic/15739/faq-desk-request-for-help-without-sufficient-information-to-help-you), we might be able to help more. Especially important are the **?** menu's **Debug Info** contents, a thorough description of the steps necessary to reproduce your problem, example text highlighted using the `</>` button or [Markdown syntax](/topic/21925/faq-formatting-forum-posts), and possibly a screenshot of the problem (if you think it will help clarify the problem; use Windows' **Snip & Sketch** or `Alt+PrtScrn` to capture the image, and `Ctrl+V` to paste it in your post).*
![](/assets/uploads/files/1687269718593-ce652379-4ede-4ac5-af76-ab3e2b322a42-image.png)

The "Dail Criteron" for effort

Per the "[Dail Critereon](https://community.notepad-plus-plus.org/post/53507)", all I should say is ...


* Special Characters:
    * Checkboxes: `☐ ☑ ☒ ✓ ✗ ◯ ○ 🔘 ⊙ ⦾ ⦿` -- where the last is my favorite (but doesn't always render in NPP)
        especially useful for saying whether to ☑ Enable or ☐ Disable a checkbox in a dialog box
    * [Arrows](http://www.fileformat.info/info/unicode/block/arrows/utf8test.htm):
        * Standard Arrows: `← ↑ → ↓ ↔ ↕ ⇐ ⇑ ⇒ ⇓ ⇔ ⇕`
        * Circle Arrows: `↶ ↷ ↺ ↻ ⟲ ⟳ ⭮ ⭯`
        * Other Arrow-like Characters: `▲ ▶ ▼ ◀ 〈 〉 ﹀ ︿ 《 》 ︽ ︾`
        * [Wikipedia:Arrows (Unicode block)](https://en.wikipedia.org/wiki/Arrows_(Unicode_block))
    * Angles: ΘΦΨ (upper) θφψ (lower) ° (degrees) ∠ (angle) ∟ (right angle) ⟂ (perpendicular)
    * Products: dot:⋅ bigdot:∙ cross:× star:⋆
        * [Operators](https://www.fileformat.info/info/unicode/block/mathematical_operators/utf8test.htm)
    * [Unicode Computing Symbols](http://xahlee.info/comp/unicode_computing_symbols.html):
        * Control Key: choose your favorite:
            * `^` `U+005E` CIRCUMFLEX (ASCII) (standard practice)
            * `✲` `U+2732` OPEN CENTRE ASTERISK
            * `⎈` `U+2388` HELM
            [![](https://i.imgur.com/0Mon4gO.png)](https://i.imgur.com/0Mon4gO.png)
        * Windows Key:
            * `❖` `U+2756` BLACK DIAMOND MINUS WHITE X
            [![](https://upload.wikimedia.org/wikipedia/commons/thumb/3/3c/Touche_Windows_8_10.jpg/120px-Touche_Windows_8_10.jpg)](https://upload.wikimedia.org/wikipedia/commons/thumb/3/3c/Touche_Windows_8_10.jpg/120px-Touche_Windows_8_10.jpg)
        * Apple Command Key:
            * `⌘` `U+2318` PLACE OF INTEREST
            * `🍎` `U+1F34E` RED APPLE
            * `🍏` `U+1F34F` GREEN APPLE
            [![](https://upload.wikimedia.org/wikipedia/commons/thumb/4/40/Apple_key.jpg/60px-Apple_key.jpg)](https://upload.wikimedia.org/wikipedia/commons/thumb/4/40/Apple_key.jpg/60px-Apple_key.jpg)
        * Menu Key: these all have the same rectangle-with-horizontal-lines that shows up on the "menu / right click" key
            * `≣` `U+2263` STRICTLY EQUIVALENT TO
            * `≡` `U+2661` IDENTICAL TO
            * `☰` `U+2630` Chinese TRIGRAM FOR HEAVEN
            * `▤` `U+25A4` SQUARE WITH HORIZONTAL FILL
            [![](https://upload.wikimedia.org/wikipedia/commons/thumb/1/1d/Kontextmen%C3%BC.jpg/120px-Kontextmen%C3%BC.jpg)](https://upload.wikimedia.org/wikipedia/commons/thumb/1/1d/Kontextmen%C3%BC.jpg/120px-Kontextmen%C3%BC.jpg)
        * Lots more; explore that page
        * These symbols can be used when typing key combinations, such as `^C` for "control C" or `❖R` for `windows-key R`.  Though usually, I just end up using `Ctrl+C`, `Alt+C`, `WIN+R` or similar
    * Footnotes/Links:
        * `🔗` `U+1F517` LINK SYMBOL
        * `⛓` `U+26D3` CHAINS
        * `↗` `U+2197` NORTH EAST ARROW
        * `↱` `U+21B1` UPWARDS ARROW WITH TIP RIGHTWARDS
        * `°` `U+00B0` DEGREE SIGN
        * `⁰` `U+2070` SUPERSCRIPT ZERO
        * `¹` `U+00B9` SUPERSCRIPT ONE
        * `²` `U+00B2` SUPERSCRIPT TWO
        * `³` `U+00B3` SUPERSCRIPT THREE
        * `ⁿ` `U+207F` SUPERSCRIPT LATIN SMALL LETTER N
        * `†` `U+2020` DAGGER
        * `‡` `U+2021` DOUBLE DAGGER
        * `🛈` `U+1F6C8` CIRCLED INFORMATION SOURCE
        * [Unicode Superscripts and Subscripts Block](https://www.fileformat.info/info/unicode/block/superscripts_and_subscripts/utf8test.htm)
            * `⁰¹²³⁴⁵⁶⁷⁸⁹⁺⁻⁼⁽⁾ⁿⁱ` Superscripts
            * `₀₁₂₃₄₅₆₇₈₉₊₋₌₍₎` Subscript Numeric
            * `ₐₑₒₓₔₕₖₗₘₙₚₛₜ` Subscript Alpha
            * `ᵢᵣᵤᵥᵦᵧᵨᵩᵪ` [Phonetics](https://www.fileformat.info/info/unicode/block/phonetic_extensions/utf8test.htm)
    * Smileys:
        * ☺ `U+2640`       SMILE       `:-)` `:)`
        * ☹ `U+2639`       FROWN       `:-(` `:(`
        * 😃 `U+1F603`      OPEN        `:-D` `:D`
        * 😉 `U+1F609`      WINK        `;-)` `;)`
        * 😐 `U+1F610`      NEUTRAL     `:-|` `:|`
        * 😜 `U+1F61C`      TongueOut   `:-p` `:p`
        * 😲 `U+1F632`      ASTONISHED  `:-o` `:o`

What's 64-bit ready, and what's stuck at 32-bit?

   * ☑ NPP <https://notepad-plus-plus.org/download/>
   * ☑ NppExec 0.5.3 2015-03-04 (https://sourceforge.net/projects/npp-plugins/files/NppExec/) (however, 0.6 is under alpha, and is presumably working on a 64bit)
      * per <https://sourceforge.net/p/npp-plugins/discussion/672146/thread/6ca78e8a/>, there is a 20160628 build 5.9.9dev, and on 20170320, it was updated (with the same 2016-dated name) to have a 64bit version
        -> this one is available in the x64.PluginManager
   * ☒ PreviewHTML 1.3.1.0 2013-07-14 <http://fossil.2of4.net/npp_preview/home>
      * <http://fossil.2of4.net/npp_preview/tktview?name=240f1abc07> claims there's a test version, just not ready for primetime yet.
      * Work happens occasion (most recent 2018-11-03), but still no release.
      * Alternative: I wrote up PythonScript scripts as [⇉📺⇉ pyscFilteredViewer](https://github.com/pryrt/pyscFilteredViewer)
   * ☑ ComparePlugin v2.0.0 (as of 2019-01-23) is 64-bit
      * was: 1.5.6 2010-06-08 <https://github.com/bruderstein/PythonScript/releases>
   * ☑ PythonScript 1.3.0 2018-10-09 <http://sourceforge.net/projects/npppythonscript/>
   * ☑ NppFTP 0.26.8 <https://github.com/ashkulz/NppFTP/>
   * ☒ DBGP 0.13b 2012-08-25 <https://sourceforge.net/projects/npp-plugins/files/DBGP%20Plugin/>
      * I almost never used it anyway, so just live without it
   * ☑ PluginManager  <https://github.com/bruderstein/nppPluginManager/releases>
  * SaveAsAdmin plugin: @chcg cloned to an x64 version [see thread](https://community.notepad-plus-plus.org/topic/15150/incorporating-saveasadmin-s-handling-into-n-s)

I have actually switched over to a portable x64 version in my path

Some day, I might want to build a custom lexer, or other Notepad++ plugin. These are links I've gathered that may or may not help me with that.

* Oh, awesome.  I found that VinsWorldCom had a [plugin on github](https://github.com/vinsworldcom/nppColHighlight) that's compiled using perl's gmake with a Makefile!  Yes, something I'll be able to learn from!
* [Post:Duplicate built-in language](https://community.notepad-plus-plus.org/topic/13377/duplicate-built-in-language) links to the VB Lexer...
  * register using

        LexerModule lmVB(SCLEX_VB, ColouriseVBNetDoc, "vb", FoldVBDoc, vbWordListDesc);
        LexerModule lmVBScript(SCLEX_VBSCRIPT, ColouriseVBScriptDoc, "vbscript", FoldVBDoc, vbWordListDesc);
  * some digging around there found the `scintilla/include/Scintilla.iface` -> `SciLexer.h`
  * `SCLEX_AUTOMATIC`: appears to be what you're supposed to use for the first argument to `LexerModule()` when it's not one of
    the official lexers...
* [Post:GedcomLexer announcement](https://community.notepad-plus-plus.org/topic/13105/plugin-update-gedcomlexer-v0-3-3-r100)
* [Develop a plugin](https://community.notepad-plus-plus.org/topic/12676/develop-a-plugin) -- implies plugin is doable from g++
  * [Plugin Development#Compilers](http://docs.notepad-plus-plus.org/index.php?title=Plugin_Development#Compilers) strongly implies that MinGW will work... but the converter links referenced are dead links :-()
    * dead link: [found in wayback machine](https://web.archive.org/web/20160307035359/http://forum.icd.no/viewtopic.php?t=64)
      * convert .sln or .vcproj to .dsw/.dsp using http://www.arstdesign.com/articles/prjconverter.html
      * download Jose Fonseca's dsw2mak.awk (which might be part of msys... not sure)
        * http://mefriss1.swan.ac.uk/~jfonseca/gnu-win32/software/msds/dsw2mak.awk -> link appears dead
        * this might be a version of it: https://github.com/mtek-hack-hack/mtktest/blob/master/%20mtktest%20--username%20qq413187589/N65/N65_V1/tools/MinGW/bin/dsw2mak
      * gawk -f dsw2mak.awk project.dsw
* [gstavi's lexer examples](http://sourceforge.net/projects/lexamples) [sep 2016] -- awww, no source code. :-(
* [EmptyFilesAsUnicode](https://community.notepad-plus-plus.org/topic/15067/new-plugin-empty-files-as-unicode) -- he uses CMake w/ Visual C++, so doesn't seem to have the .vcproj file that comes with the template... I might want to study that
* @Claudia-Frank's PythonLexer: my collection of links to her effort is at [https://community.notepad-plus-plus.org/topic/16164/bug-javascript-multiline-character-not-understood-by-notepad/11](https://community.notepad-plus-plus.org/topic/16164/bug-javascript-multiline-character-not-understood-by-notepad/11)

Change character representation

See my [previous post](https://community.notepad-plus-plus.org/topic/14754/entering-zwnj-zero-width-non-joiner) on the subject of zero-width characters, and an [earlier post](https://community.notepad-plus-plus.org/topic/14045/invisible-characters-unwanted/15) where I even shared a pair of PythonScript scripts to give a fuller `Show All Characters` and `Don't Show All Characters` functionality

    # script = Show All Characters (including ZeroWidth)
    editor.setRepresentation(u'\u200B', "ZWS")
    editor.setRepresentation(u'\u200C', "ZWNJ")
    editor.setRepresentation(u'\u200D', "ZWJ")
    editor.setRepresentation(u'\uFEFF', "ZWNBSP")
    # if you want to _also_ show all characters with this script,
    #   first pick a different View > Show Symbols option,
    #   then pick this one (each is a toggle, so don't want to accidentally hide all characters if show-all was already selected)
    notepad.menuCommand(MENUCOMMAND.VIEW_EOL)
    notepad.menuCommand(MENUCOMMAND.VIEW_ALL_CHARACTERS)

    # script = Don'tShow All Characters (including ZeroWidth)
    editor.clearRepresentation(u'\u200B')
    editor.clearRepresentation(u'\u200C')
    editor.clearRepresentation(u'\u200D')
    editor.clearRepresentation(u'\uFEFF')
    # if you want to _also_ hide all characters with this script,
    #   first pick a different View > Show Symbols option,
    #   then pick this one twice (each is a toggle, so don't want to accidentally show all characters if show-all was already cleared)
    notepad.menuCommand(MENUCOMMAND.VIEW_EOL)
    notepad.menuCommand(MENUCOMMAND.VIEW_ALL_CHARACTERS)
    notepad.menuCommand(MENUCOMMAND.VIEW_ALL_CHARACTERS)

(see also editor.getViewEOL and editor.getViewWS, which I keep forgetting)
* NPP_EXEC

    npp_run _blah_          : run _blah_ in separate window
    npp_run cmd /k _blah_   : run _blah_ in separate window, staying in cmd.exe after it's done
    help                    : shows help info in console
    manual                  : separate 'help' file

* NPP Environment Variables

    $(FULL_CURRENT_PATH)  : E:\my Web\main\welcome.html
    $(CURRENT_DIRECTORY)  : E:\my Web\main
    $(FILE_NAME)          : welcome.html
    $(NAME_PART)          : welcome
    $(EXT_PART)           : .html
    $(NPP_DIRECTORY)      : the full path of notepad++'s directory
    $(CURRENT_WORD)       : word(s) you selected in Notepad++
    $(CURRENT_LINE)       : current line number
    $(CURRENT_COLUMN)     : current column number

Minimal functionList example

Trying to come up with minimal functionList example. Unfortunately, function list basics FAQ has the outline without any specifics.

This example has room for more minimalization... but it shows a basic working example, so let's

example data

Category Before {
}

START ClassName
    Category QA_Cold { }
    Category FT_Cold { }
    Category QA_Room { }
    ParamGlobals { }
END

Category Between {
}

START SecondClassName
    Category QA_Cold { }
    Category FT_Cold { }
    Category QA_Room { }
    ParamGlobals { }
END

example XML

<?xml version="1.0" encoding="UTF-8"?>
<!-- ==========================================================================\
|
|   To learn how to make your own language parser, please check the following
|   link:
|       https://npp-user-manual.org/docs/function-list/
|
\=========================================================================== -->
<NotepadPlus>
    <functionList>
        <parser displayName="LtxMxEnVision"
                id="LtxMxEnVision"
                commentExpr="">
                <classRange
                    mainExpr    ="(?x)                                          # free-spacing (see `RegEx - Pattern Modifiers`)
                            (?m)                                                # ^ and $ match at line-breaks
                            ^START\b
                            .*?                                                 # whatever,
                            ^END\b
                        "
                >
                    <className>
                        <nameExpr expr="(?x)                                    # free-spacing (see `RegEx - Pattern Modifiers`)
                                \s
                                \K                                              # discard text matched so far
                                \w+
                            "
                        />
                    </className>
                    <function
                        mainExpr="Category \w+|ParamGlobals"
                    >
                        <functionName>
                            <funcNameExpr expr="sub \K\w+|Category \w+|ParamGlobals"
                            />
                        </functionName>
                    </function>
                </classRange>
            <function mainExpr="Category \w+|ParamGlobals"/>
        </parser>
    </functionList>
</NotepadPlus>

perlapi

When there is a new version of Perl released with new keywords, I need to update the langs.xml and autoCompletion\perl.xml for any new keywords. Per what Michael Vincent and I worked out, it needs to keep the CGI.pm keywords (the -BGCOLOR attributes, as well as all the html-generation functions, etc), all the builtins, and the pragmas


page look-and-feel inspired by lifehacker.me