[New Plugin] Brackets Check

  • A plugin that helps you to check if brackets in your file are balanced.
    You can check all text in a file or only the part you selected.
    BracketsCheck Notepad++ Plugin

    Feel free to clone, create issues, branching and whatever you want.
    Spread the word, if you like it :)

  • Consider using the https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net as the foundation of your plugin. It a modernized version of the plugin code for C#. I’d be really interested if something is missing etc… ie. it is code that is actually being maintained ;)

  • The plugin have been updated.
    Version 1.2 includes brackets type parametrization and parameters save/load.

    BracketsCheck Notepad++ Plugin

  • Hi - I discovered this fantastically useful plugin a couple of months ago (writing basically TCL scripts in a for a crippled interpreter that won’t even give you a line number on error).

    It seems incompatible with the latest version of NP++, which offers disabling of the plugin on startup.

    Anybody an idea what the issue is?
    Thanks very much,

    Notepad++ v7.5.8 (32-bit)
    Build time : Jul 23 2018 - 02:03:53
    Path : M:\Notepad++\notepad++.exe
    Admin mode : ON
    Local Conf mode : ON
    OS : Windows 7 (32-bit)
    Plugins : DSpellCheck2.dll JSMinNPP.dll NppFTP.dll NppTextFX.dll PluginManager.dll Tidy2.dll DSpellCheck.dll mimeTools.dll NppConverter.dll NppExport.dll

  • @Matthew-Toy

    what exactly is the error you get?
    Could it be that you try to load a 64bit plugin for a 32bit notepad++ application?


  • I had an issue with the saving of settings feature that was added. Seems that while it saved the settings to the INI correct, and updated the menu items correctly, it didn’t update the variables when the plugin loaded, which cause the Menu check boxes and the variables themselves to be out of sync with each other.

    The variables are initialized as true, however if they were unchecked and notepad++ was closed, and then opened again, they would be true but the menu would be unchecked. When the plugin is ran to check bracket, it acted as if all boxes were checked even though the menu showed them unchecked. I made a change and submitted a pull request to the GitHub. The change was made in Main.cs in the CommandMenuInit()

    internal static void CommandMenuInit()
                PluginBase.SetCommand(0, "Check Brackets: All text", checkBracketsAll);
                PluginBase.SetCommand(1, "Check Brackets: Selected text", checkBracketsSelected);
                PluginBase.SetCommand(2, "", null); // ----------------------------------
                string checkRound = "Check round brackets";
                string checkSquare = "Check square brackets";
                string checkCurly = "Check curly brackets";
                string checkAngle = "Check angle brackets";
                PluginBase.SetCommand(3, checkRound, toggleCheckRoundBrackets, Win32.GetPrivateProfileInt(PluginName, checkRound, 1, PluginBase.IniFilePath) > 0);
                if (Win32.GetPrivateProfileInt(PluginName, checkRound, 1, PluginBase.IniFilePath) < 1) checkRoundBrackets = false;
                PluginBase.SetCommand(4, checkSquare, toggleCheckSquareBrackets, Win32.GetPrivateProfileInt(PluginName, checkSquare, 1, PluginBase.IniFilePath) > 0);
                if (Win32.GetPrivateProfileInt(PluginName, checkSquare, 1, PluginBase.IniFilePath) < 1) checkSquareBrackets = false;
                PluginBase.SetCommand(5, checkCurly, toggleCheckCurlyBrackets, Win32.GetPrivateProfileInt(PluginName, checkCurly, 1, PluginBase.IniFilePath) > 0);
                if (Win32.GetPrivateProfileInt(PluginName, checkCurly, 1, PluginBase.IniFilePath) < 1) checkCurlyBrackets = false;
                PluginBase.SetCommand(6, checkAngle, toggleCheckAngleBrackets, Win32.GetPrivateProfileInt(PluginName, checkAngle, 1, PluginBase.IniFilePath) > 0);
                if (Win32.GetPrivateProfileInt(PluginName, checkAngle, 1, PluginBase.IniFilePath) < 1) checkAngleBrackets = false;

    I added simple if statement and get the value of the INI and if it’s less than 1 then set it to false.

    After doing some hunting and finding some missing files from the GitHub I managed to get this compiled and verified to now work as originally intended. Hopefully the author sees the pull request and gets it merged so that it appears correctly in the plugin manager.

  • With the help of @Jesse-Bevil, version 1.2.1 has just been released with this bug fix.

Log in to reply