Community
    • Login

    A new C++ plugin template

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    2 Posts 2 Posters 2.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • dailD
      dail
      last edited by

      Over the years I’ve created more than a few plugins (some available for download…and several that were never finished or made publicly available). Each time I ended up taking an old project, hacking it up, grepping through all the files and renaming everything. This can be quite tedious and error prone.


      I’ve created a template for C++ plugins based on my experience doing plugin development. This isn’t just a generic template to modify yourself, this is a cookiecutter template that can dynamically generate a new plugin project for you. To create your own plugin:

      1. Install Notepad++ v7.7 (or later)
      2. Install Python (if not installed already)
      3. From a command prompt, run:
      pip install cookiecutter
      cookiecutter https://github.com/dail8859/cookiecutter-npp-cpp-plugin.git
      
      1. You will be asked some basic info (project name, description, etc.) for the new plugin.
      2. Open the newly created .sln file with Visual Studio 2017
      3. Press F5 and enjoy.

      Visual Studio will build and copy the newly created DLL file into plugin directory of Notepad++. It will also start the Notepad++ application for debugging, meaning you can set breakpoints and step through your plugin source code.


      This is still in development and not complete, however it quite usable and will create a project you can instantly run. Hopefully this template can be refined and incorporate other best practices for creating C++ plugins.

      EkopalypseE 1 Reply Last reply Reply Quote 10
      • EkopalypseE
        Ekopalypse @dail
        last edited by

        @dail - wondering why it is not listed here?

        1 Reply Last reply Reply Quote 2
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors