[New plugin] Columns++
-
@Coises said in [New plugin] Columns++:
I could not find any way to know what indicators other plugins might be using
You are not alone; see HERE.
was the issue you posted about stale text on the Search dialog resolved in subsequent releases?
I have not seen it recur.
The new stuff is in Pre-release 0.2.0.6-alpha.
I will try it.
EDIT: I gave it a spin, and I feel much more at ease about find-nexting through a column-block, now that I can see the block while the search is on-going. Nice job!
Something new:
I noticed when I try these links from the about box, nothing happens on my system:
-
@Alan-Kilborn said in [New plugin] Columns++:
I noticed when I try these links from the about box, nothing happens on my system:
Did you copy all the files from ColumnsPlusPlus-0.2.0.6-x86.zip or ColumnsPlusPlus-0.2.0.6-x64.zip into plugins/ColumnsPlusPlus, or just the dll?
If the files aren’t there, that’s the reason. If they are there, then I’m not sure what to think would be the cause.
Oh… if you built from source using my Visual Studio solution, the post-build steps only copy the dll, not the supporting files.
-
@Alan-Kilborn said in [New plugin] Columns++:
@Coises said in [New plugin] Columns++:
was the issue you posted about stale text on the Search dialog resolved in subsequent releases?
I have not seen it recur.
That’s good. I’ll close the issue.
The new stuff is in Pre-release 0.2.0.6-alpha.
EDIT: I gave it a spin, and I feel much more at ease about find-nexting through a column-block, now that I can see the block while the search is on-going. Nice job!
Thank you, Alan. Hopefully this also fixes the problem you first noted of successive Replace actions not catching all the originally selected instances of the text to be replaced.
-
@Coises said in [New plugin] Columns++:
If the files aren’t there, that’s the reason
Yea, that’s probably it. I was building from source and I just took the .dll file. I’ll add the supporting files; it will probably solve it.
-
@Coises said in [New plugin] Columns++:
Hopefully this also fixes the problem you first noted of successive Replace actions not catching all the originally selected instances of the text to be replaced.
Yes, but I noticed something new. Unlike N++'s replace, the plugin’s doesn’t do the replacement and auto-find the next match; it leaves the replacement text selected (and waits for further user action). This is okay, but it isn’t how N++ does it, so users may have concerns.
Also, something like this will keep it from ever advancing to the next match:
Continuing to press Replace in this situation merely keeps replacing the same
T
. -
@Alan-Kilborn said in [New plugin] Columns++:
@Coises said in [New plugin] Columns++:
I could not find any way to know what indicators other plugins might be using
You are not alone; see HERE.
I added a comment to that issue… and only afterward noticed that the feature request was made in 2019.
The short version of my comment is that it’s a good idea, but what about all the plugins already out there that won’t necessarily be updated to use the new system? Encouraging new plugin authors to think there’s a reliable system for allocating indicators when there won’t be until existing plugins either are updated or become obsolete for other, unrelated reasons might be worse than no system at all.
-
@Alan-Kilborn said in [New plugin] Columns++:
@Coises said in [New plugin] Columns++:
Hopefully this also fixes the problem you first noted of successive Replace actions not catching all the originally selected instances of the text to be replaced.
Yes, but I noticed something new. Unlike N++'s replace, the plugin’s doesn’t do the replacement and auto-find the next match; it leaves the replacement text selected (and waits for further user action). This is okay, but it isn’t how N++ does it, so users may have concerns.
It’s a user option in Notepad++ (Preferences|Searching|Replace: Don’t move to the following occurrence). Personally, I can’t stand being unable to see what happened when text was replaced, so I keep that option checked. Almost forgot it was there.
Do you happen to know if there’s a clean way to read the current state of a user preference setting from a plugin? Many are reflected in Scintilla settings (which can be easily interrogated), but this isn’t one of them.
Also, something like this will keep it from ever advancing to the next match:
Continuing to press Replace in this situation merely keeps replacing the same
T
.That’s a bug; the search should start after (or before, if searching backward) the replaced text. I probably introduced it when I changed from searching in a selection to searching indicated text. Thank you for the report: I’ll fix it.
-
@Coises said in [New plugin] Columns++:
It’s a user option in Notepad++ (Preferences|Searching|Replace: Don’t move to the following occurrence). I keep that option checked. Almost forgot it was there.
As did I, as I would never checkmark that option. :-)
Do you happen to know if there’s a clean way to read the current state of a user preference setting from a plugin? Many are reflected in Scintilla settings (which can be easily interrogated), but this isn’t one of them.
I don’t think there is a great way.
I suppose you could read it out ofconfig.xml
but that’s not an ideal solution. -
@Alan-Kilborn said in [New plugin] Columns++:
Yes, but I noticed something new. Unlike N++'s replace, the plugin’s doesn’t do the replacement and auto-find the next match; it leaves the replacement text selected (and waits for further user action). This is okay, but it isn’t how N++ does it, so users may have concerns.
Also, something like this will keep it from ever advancing to the next match:
Continuing to press Replace in this situation merely keeps replacing the same
T
.I’ve addressed both issues in version 0.2.1.7-alpha. There is now an option equivalent to the Notepad++ option Replace: Don’t move to the following occurrence which similarly defaults to unchecked. Also, when that option is checked (or when there are no more matches), the caret is placed at the end (or beginning, if searching backward) of the replacement text. The text being highlighted was causing the failure to advance.
-
This post is deleted! -
Version 0.3-alpha adds Convert separated values to tabs… and Convert tabs to separated values… commands. Help has been updated.
There are a surprising number of wrinkles to csv/tsv conversion, and testing has not been exhaustive of all the possibilities… so, a reminder: Be sure you’ve saved any important work before trying the new features, just in case they crash or hang Notepad++.
Thanks in advance for any critiques, suggestions or problem reports anyone can provide.
-
Version 0.4-alpha improves performance with Elastic tabstops enabled, especially when using monospaced fonts.
-
@Coises said in [New plugin] Columns++:
Version 0.4-alpha improves performance with Elastic tabstops enabled, especially when using monospaced fonts.
Version 0.4.1-alpha fixes a regression in performance of Undo/Redo with Elastic tabstops enabled that was introduced in version 0.4. Also, there is now a “quick installer” which should make it easier for users who have Notepad++ installed in the default location to install or update Columns++.
-
-
Version 0.5 adds the Calculate… command, which inserts the results of a calculation into each line of a rectangular selection.
I haven’t (yet) devised a way to make use of the new feature self-evident; you won’t be able to figure out how to write formulas without reading the documentation.
-
Columns++ version 0.6-alpha adds the Sort… command and dialog supporting custom sorts, including selection of locale for locale sorts, sorting within the column selection only (leaving data surrounding the selection in place), and sort keys derived from a regular expression match. Details are in the updated help.
Convert Tabs to Spaces should now be significantly faster for large files.
You can use the Quick Installer if you have Notepad++ (either 32-bit, 64-bit or both) installed in the default location(s).
-
A minor update from version 0.6-alpha, Columns++ version 0.6.1-alpha uses NPPM_ALLOCATEINDICATOR, introduced in Notepad++ 8.5.6, for allocating the search custom style indicator while remaining compatible with older versions. This release includes a few minor cosmetic fixes, and updated help for the Options dialog describing the custom style indicator options.
You can use the Quick Installer if you have Notepad++ (either 32-bit, 64-bit or both) installed in the default location(s).
-
Columns++ version 0.7-alpha enables formulas in regular expression replacements in the Search in indicated region dialog. For example, if you want to change every occurrence of “IDN-number” by adding 7 to the numeric part, you can use:
Find what:
(?<=\bIDN-)\d+\b
Replace with:(?=this+7)
There are also enhancements regarding the use of time formats (days:hours:minutes:seconds) in calculations, some more flexibility for managing search regions, and other improvements. The help has been updated (in particular, see the sections on Search, Calculation, Formulas and Number formats).
There are some known problems (not new to this release) when Elastic tabstops are enabled and you make a large rectangular selection (e.g., many thousands of lines — it also matters how many tabs are on each line, regardless of whether those tabs are included in the selection). The most serious is that when switching from a tab in which the MarkdownPanel plugin shows its side panel to a tab with a large rectangular selection and Elastic tabstops enabled, Notepad++ can freeze for so long that there is no reasonable choice but to force close it. The takeaway for now is that if you choose to enable Elastic tabstops on large files (more than a few thousand lines, particularly if there are also many tabs per line), be sure to keep significant work in all tabs saved.
I haven’t delayed the release for this, because it is not new to this release… it’s just that I only discovered it yesterday. Of course, when I find a way to mitigate it, I’ll update with a new release. Right now, I do not understand what having a side panel open on a different tab should have to do with it, and I don’t know if it’s specific to the MarkdownPanel plugin. (It doesn’t happen with the built-in Document Map panel.) Because I don’t understand it, I can’t predict when I’ll have a fix.
-
@Coises said in [New plugin] Columns++:
Right now, I do not understand what having a side panel open on a different tab should have to do with it, and I don’t know if it’s specific to the MarkdownPanel plugin.
MarkdownPanel is an “eager” listener of Scintilla notifications when the panel is showing: https://github.com/mohzy83/NppMarkdownPanel/blob/833521f0e744987ebb415b6a9f5af56883cb6022/NppMarkdownPanel/MarkdownPanelController.cs#L80
My guess is that you’re flooding the main thread with
SCN_UPDATEUI
events, which would keep MarkdownPanel’s event loop very busy, since it doesn’t bit-mask theScNotification.Updated
field to improve the signal-to-noise ratio. -
@rdipardo said in [New plugin] Columns++:
My guess is that you’re flooding the main thread with
SCN_UPDATEUI
events, which would keep MarkdownPanel’s event loop very busy, since it doesn’t bit-mask theScNotification.Updated
field to improve the signal-to-noise ratio.Thanks. What threw me is that the updates are occurring in the tab being activated, and the markdown panel is for the tab being switched away from. But it appears that the panel doesn’t close until after my NPPN_BUFFERACTIVATE routine is finished. I have seen that there is no “this document is losing focus” notification for plugins, so now that I think of it, it makes sense that clean-up doesn’t always happen when it logically should. Probably the alphabetically later plugin gets the NPPN_BUFFERACTIVATE message later, so MarkdownPanel doesn’t have a chance to close its panel and stop listening for notifications until after I’ve already set my custom tabs. That gives me something to consider, though; perhaps I can defer the processing until the next SCN_UPDATEUI after the NPPN_BUFFERACTIVATE, if that doesn’t cause jumpiness or missed updates.
I’m currently attempting to project the time to completion for these potentially long-running activities and raise a progress dialog when the projected time remaining exceeds a threshold (e.g., three seconds). At least the dialog will make it possible to cancel the operation, with the understanding that visual layout and/or rectangular selection might be mangled; that’s a lot better than force-closing Notepad++.
Thanks again for the heads-up regarding MarkdownPanel.
-
Columns++ version 0.7.1-alpha adds a progress dialog for long-running Elastic tabstops operations. The operation can be cancelled using a link in the dialog or the Escape key. A control to set the minimum estimated time remaining to trigger the progress dialog was added to the Options dialog.
This update is recommended if you use Elastic tabstops, and especially if you use it with large files. Under some circumstances — as discussed above in this thread — a seemingly innocuous action can cause a very long delay when Elastic tabstops is enabled on a large file. This update will cause a dialog to be displayed which will make it possible to cancel the operation (rather than locking up all of Notepad++ and possibly leading the user to force-close it).