Even your grandmom can do it!

Don HO
  • Don HO

    Don HO - 2009-09-08

    Someone told me that developing a Notepad++ plugin is like a mission to Mars, so here it is :

    A plugin template for making plugin development as easy and simple as possible.

    Only 4 steps to make a simple plugin, by editing 2 files (PluginDefinition.h and PluginDefinition.cpp) :
    1. Define your plugin name in "PluginDefinition.h"
    2. Define your plugin commands number in "PluginDefinition.h"
    3. Customize plugin commands names and associated function name (and the other stuff) in "PluginDefinition.cpp".
    4. Define the associated functions.

    A plugin demo is available here, it allows plugin developers to do a plugin more sophisticated :

    Any question/suggestion? Post them here.

    Happy coding


    • McLoo

      McLoo - 2009-09-09

      My gra'ma is dead, so it's not that easy...


      • Don HO

        Don HO - 2009-09-10

        > My gra'ma is dead, so it's not that easy...
        Ok, she can not do it anymore... but you can.


  • Thell Fowler

    Thell Fowler - 2009-09-11


    Kudos DonHo,

    Looks nice and easy.  Hopefully that will help improve people's confidence at being able to write plugins.

    Perhaps some people will even tackle some of the items on the ideaTorrent.

  • Frank

    Frank - 2009-10-26

    Can I create a plugin or macro using Lua? I ask because it seems that Lua is supported by Scintilla/SciTE.

  • cchris

    cchris - 2009-10-26

    As shown on (http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Plugin_Development), any language can be used to write a plugin, as long as: 
    * it enables building a dll; 
    * the dll exposes an interface as expected by the plugin loader, which consists in a few functions with very basic paameter and return types; 
    * it is able to call C functions, since all of the Windows API, including SendMessageW(), is made of them.

    There are plugins written in Delphi, Oberon, PureBasic and C#. Ok, perhaps APL or some functional languages are not suitable, but I'm saying this because I don't know them at all and they are a bit different.



    AZJIO - 2014-03-23

    The project is compiled as ANSI. Can you convert to Unicode?

  • cchris

    cchris - 2014-03-23

    That depends on the size of the project :)
    Did you look at a few plugins the code of which is available for both ANSI and Unicode versions of N++? I usually recommend XBrackets Lite by dv__ , but there ae others. They will provide you many exampls of what needs (and does not need) converted, and how.



Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks