Plugin idea for creating list structures with folding!
-
Any thoughts on how to delineate the list starting point? I was thinking of tab indention but that would mean spaces won’t indicate a list exists at the proceeding number…
Obviously tabs would make coding easier and since this would be my first project might be best to go that route… Including spaces as possible pre-character indicators would make the plugin more robust in the long run…
I suppose I can add spaces at a later date. Was looking for feedback but I think I just answered my own question lol
-
@jgwentworth, this message board’s focus is Notepad++. The forum works best for people who have a specific issue trying to do something with Notepad++. We can’t help you with a topic as general as inventing a list or outline definition.
As you are learning cpp I’d start with Google for ‘forum for learning cpp’ and concentrate on getting proficient in that area. Good luck.
-
@mkupper This is the generic discussion forum for Notepad++ and this topic is for a Notepad++ plugin. This is the place for the topic!
I see you are very active on these forums so I assume you get irritated with small things. I would suggest you avoid this post since you are not able to see it as a Notepad++ appropriate topic!
Have a good day and maybe take a little break from the internet for a bit. Might do you some good :P)
-
@jgwentworth said in Plugin idea for creating list structures with folding!:
This is the generic discussion forum for Notepad++ and this topic is for a Notepad++ plugin. This is the place for the topic!
Please read the “Read this First” from the “Notepad++ & Plugin Development” category, which is quite explicit as to which plugin-related questions are “on topic” for the forum and which are not.
https://community.notepad-plus-plus.org/topic/24812/read-this-first(Also, because your Topic is about Plugin Development, I changed which Category it was part of.)
You will see in that entry that it is very specific: for developers of plugins, the aspects of the plugin that are specific to Notepad++ are on-topic; the aspects of the plugin that are generic programming questions are not.
(And yes, as one of the moderators/admins of this Community, I do get to play a part in deciding what is and what is not “on topic”, and the rules for what aspects of Plugin Development. We, including the Notepad++ owner, recently had a discussion about what was and was not on topic for this forum, and the plugin/coding questions in specific, and the policy enumerated in that post I linked you to is the result of that discussion.)
Based on that policy, how you choose to define how to indent outlines in your plugin is not actually Notepad++ specific, and thus it’s moving off-topic. Since it would be of interest to eventual users, I wasn’t going to stop discussion immediately, but @mkupper was right that getting into the esoterica of how an outline should be formatted and structured is not really a Notepad++ specific topic. As a compromise, my suggestion is that if you’ve got a repo for your plugin, that you link to that repo, or to an issue in that repo where you are asking for further discussion on the outline format/structure that would work best – so then interested Notepad++ users who have opinions on how your plugin should outline could take it to a place where it won’t annoy those who reasonably assume that this Community will stay focused on Notepad++ and the Notepad+±specific portions of plugin development.
-
-
I don’t know that I would stifle solicitation of good ideas about crafting the plugin under discussion. It seems on-topic to me. But… I think if OP is not moving forward with his own ideas and expecting others to “spec out” the plugin here…then, that’s really not appropriate.
Usually a plugin comes from one person’s good idea, and when they flesh it out then they ask for others to comment.
-
Sure gang up on someone looking to learn about plugins and the community surrounding them. Good moderation skills /s
From the link you provided for plugin development
This category is for:specific source code questions
build-specific questions (for those that are trying to build from source but are stuck on something)
plugin development - how to interface with Notepad++ through the Plugin Communication interface
This category is not for:Generic programming questions:
If you are new to a specific programming language, there are plenty of other places on the web to learn and ask general programming questions.Read that link first then see if it is really the appropriate place for this plug idea discussion… You will say NO!
This is the generic discussion readme
https://community.notepad-plus-plus.org/topic/21964/please-read-this-before-postingThis General Discussion section is a place to talk about Notepad++ in General.
This is very broad and encompasses this post.
I think you are also irritated by small things. I see this a lot when people get too focused or familiar with something. The best solution is to take a week off and focus on something else for while. The weather is really nice now, start a project in the back yard or go hiking for a few days… I bet you come back fresh and relaxed! ;)
-
Did you notice I upvoted Alan’s post, when he defended you for being on topic? That’s because I decided that I had been a bit too harsh.
-
@jgwentworth You asked for feedback and you got it. Your stated goal is a Notepad++ plugin that will do something with lists and outlines. You also had said that you are “just now learning cpp so maybe I can work on this as a project in the near future.” Great, step one towards your goal seems to be for you to learn cpp.
While you are still learning cpp and making/debugging exe and later dll files you can use that time to understand how to work with lists, collections, or arrays of text strings within cpp and to experiment with ideas for parsing those strings to detect if they seem to be defining a list or outline and then to generate and/or renumber the lists or outlines. Using cpp, you can create .exe applications that read text files, and generate the same files with n outline structure. It’s your universe and you can make and change the rules for the outline stuff as much as you want.
I’ll provide an additional bit of feedback which is that all Notepad++ plugins are DLL files. Normally when learning a computer language you first learn to make .exe files that do things. Once you are proficient enough at the creating exe files that do the things you want you will then need to figure out how to make and debug dll files. You will discover that it’s not as familiar territory as 99% of the people who use computer languages also only work with .exe files.
Once you are proficient at creating and debugging dll files you would then focus on creating dll files that work within Notepad++'s plugin framework. That’s the topic area where we are more than happy to help people on the forums.
Notepad++ itself, and nearly all, if not all, plugins were labors of love where the developer wanted to solve an issue of personal interest to themselves. Nearly always they already were experienced with a computer language, it does not have to be cpp, and experienced with creating and debugging dlls. You will have the extra challenges of first learning cpp and then knowing cpp well enough to create error free code as the dll environment is far less forgiving of bugs than the exe environment.
-
@mkupper said in Plugin idea for creating list structures with folding!:
Once you are proficient enough at the creating exe files that do the things you want you will then need to figure out how to make and debug dll files.
To be a program, a binary file only needs an entry point, which in practice is a global function called
main
for console apps, orWinMain
for graphical ones. The entry point of a Windows dynamic library is DLLMain, so DLLs technically are programs, unlike dynamic libraries on Linux or MacOS, which are just catalogues of functions, with no runnable code.If you peek at the resource descriptor of the canonical C++ plugin template, you’ll see the value assigned to the
FILETYPE
PE header flag is the macroVFT_APP
, which indicates the “[f]ile contains an application”. -
@rdipardo Sorry for sneaking into this discussion, but I just whipped up a quick 5-minute example. While it’s a simple solution and might not cover all nuances, maybe it can serve as a starting point or a simple helper:
Find what:
(\d+)\.(\d+)\.(\d+)
Replace with:cond(CAP1 > 0 and CAP2 == 0 and CAP3 == 0, MATCH, cond(CAP2 > 0 and CAP3 == 0, " " .. MATCH, " " .. MATCH))
This example showcases how you can use multiple formatting combinations. Additionally, it’s worth noting that you can also set multiple formatting steps sequentially to achieve more complex patterns.
Please note that this plugin will be rolled out with the next Notepad++ update. However, you can download it in advance here.
As mentioned, it’s a quick workaround and might need refinements to handle all possible scenarios.