Plugin idea for creating list structures with folding!
Since this is a plugin idea I don’t think it belongs in the feature request… maybe that’s where plugin ideas go? I don’t think so
I am just now learning cpp so maybe I can work on this as a project in the near future but figured I’d get some feedback from the forums first. I think others will like the application for this idea too!
I use n++ for making list all the time. I used to make complex lists like th following:
1. a. i. 1. 2. 1.0.0 1.1.0 1.1.1 1.2.0 2.0.0
However when adding an item in the middle or beginning of the list I then had to manually go down the item and update… what a pain!
I then starting making simple list structures
1. 2. 3. 1. 2. 1.
Which makes updating a little less tedious but if you want to reference another step then you get lost
1. Do something 2. Do something else 3. Do another thing 1. Do something that you haven't done yet 2. ... 1. Do the same thing from the previous Step 1. (?which step 1?!)
So I thought wait what if there was a list plug sort of like word where the list items are linked and can be updated automatedly!
Unfortunately I searched the plugs and did not find them.
So what do you think? I would like to know if others would find this useful too
P.s I just though well if we are using indentations then lets add a folding structure too! I currently have to save the extension as .py to get that functionality :(
So what do you think?
I thought others had previously talked about such things here, but I don’t think anything came of it. If you are willing and able to carry it through, I’m sure there will be people who would use the plugin.
(You might want to search the forum for “outline”, because there may be relevant discussions and/or scripts that might give you a starting point)
P.s I just though well if we are using indentations then lets add a folding structure too! I currently have to save the extension as .py to get that functionality
I think you would have to add the “lexer plugin” hooks to do that.
@jgwentworth As maintaining numbered lists is a pain I tend to either avoid numbering or to use something that supports automatic numbering, such as HTML.
HTML also can deal with the “1. Do the same thing from the previous Step 1. (?which step 1?!)” issue by adding and using anchors and to not reference things by their step number.
HTML also provides enough machine readable structure that folding is possible.
Something else to consider is word wrapping and styling. Usually when we are at an indented level of an outline tree there is also an expectation that that text be styled in a certain way in terms of bullet styles, indent/outdent, margins, fonts, colors, etc. Both HTML (with CSS) and Microsoft Word, provide a great deal of control over the styling within lists and outlines and so I’m wondering if users of an outline plugin would also expect that level of control.
I am personally also not in favor of inventing yet another language or markup style and encourage people to use or improve on what’s already available. I started this paragraph thinking about WikiText lists but then realized this forum system also has a markup language though for some reason this one is called markdown…
@mkupper Interesting. So using HTML may provide the list operations I’m looking for? I should probably be clear and specify that I want to only use my text file for documentation and NOT transfer to another format (word was just used as a reference).
If that was clear and I can use HTML extension with some sort of formatting in a text file that N++ can then create an automatic list structure, then great. I just need to learn that syntax…
@PeterJones Thanks for the pointers, I am motivated to look into creating this type of plugin. It seems challenging but fun!
I just searched through the outline results and am not seeing exactly what I’m looking for…
The markdown feature is really interesting and has now convinced me I also want to create a TOC (by referencing a specifier for the text line (similar to word header types))
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)
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.
(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
This 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.
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
mainfor console apps, or
WinMainfor 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
FILETYPEPE header flag is the macro
VFT_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:
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.