Community
    • Login

    [New plugin] Columns++

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    69 Posts 9 Posters 16.5k 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.
    • Mark OlsonM
      Mark Olson @Coises
      last edited by

      @Coises
      Nice, looks great!

      It looks like you meant to say Copy these results to the clipboard and forgot the word clipboard, though.

      153bb876-40b9-469c-bcec-51458cb73f3c-image.png

      CoisesC 1 Reply Last reply Reply Quote 1
      • CoisesC
        Coises @Mark Olson
        last edited by

        @Mark-Olson said in [New plugin] Columns++:

        @Coises
        Nice, looks great!

        It looks like you meant to say Copy these results to the clipboard and forgot the word clipboard, though.

        Thanks! Corrected.

        1 Reply Last reply Reply Quote 1
        • CoisesC
          Coises @Bas de Reuver
          last edited by

          @Bas-de-Reuver said in [New plugin] Columns++:

          At first I clicked Sort ascending (numeric) assuming that it would base the column on the current cursor position, but nothing happened. After a while I figured out that you first have to column-select part of the data file, and then select the “Sort ascending” option from the plugin menu. Maybe add a popup warning message when the user clicks a menu item but no column-selection was made.

          Thank you again for your suggestions. I’ve made some changes to address this, which are available in version 0.1.0.5-alpha. Instead of just doing nothing, a dialog box comes up stating that the command requires a rectangular selection, and (depending on what selection, if any, already exists) offering to create one. I hope it’s comprehensible; feedback, as always, is welcome.

          Mark OlsonM 1 Reply Last reply Reply Quote 1
          • Mark OlsonM
            Mark Olson @Coises
            last edited by

            @Coises
            Just tried out the new pop-up to make a rectangular selection. The one with 9 images took me a moment to figure out, but only a moment. I think it’s an awesome design, better than I would have thought to ask for.

            I thought of raising a feature request in the GitHub repo asking for a GUI that made it easy to create column selections. The 9-image GUI fills that role admirably, and I kinda feel like it should just be accessible as a default plugin command rather than something that people only discover by accident when they try to use a functionality without anything selected.

            CoisesC 1 Reply Last reply Reply Quote 0
            • CoisesC
              Coises @Mark Olson
              last edited by

              @Mark-Olson said in [New plugin] Columns++:

              Just tried out the new pop-up to make a rectangular selection. The one with 9 images took me a moment to figure out, but only a moment. I think it’s an awesome design, better than I would have thought to ask for.

              Thank you. I’m glad it seems to be working.

              I thought of raising a feature request in the GitHub repo asking for a GUI that made it easy to create column selections. The 9-image GUI fills that role admirably, and I kinda feel like it should just be accessible as a default plugin command rather than something that people only discover by accident when they try to use a functionality without anything selected.

              I wondered about that: perhaps a Select Rectangle… command that does just that and nothing else? If I did that, would it be better to “click and go” the same way these dialogs do, or should clicking the button “preview” the selection in the document, but wait for you to click OK to apply it or Cancel to revert to the state when you opened the dialog?

              Mark OlsonM 1 Reply Last reply Reply Quote 0
              • Mark OlsonM
                Mark Olson @Coises
                last edited by

                @Coises said in [New plugin] Columns++:

                If I did that, would it be better to “click and go” the same way these dialogs do, or should clicking the button “preview” the selection in the document, but wait for you to click OK to apply it or Cancel to revert to the state when you opened the dialog?

                That would be a good way to go about it!
                Probably the best way to go about it, although maybe too technically demanding, would be to preview the selection when you hover the mouse over the option, but only finalize the selection when you click on it.

                1 Reply Last reply Reply Quote 0
                • CoisesC
                  Coises @Alan Kilborn
                  last edited by

                  @Alan-Kilborn said in [New plugin] Columns++:

                  And I attempted to “walk through” and replace, using only the Replace button (I pressed nothing else, no did anything else in between presses).

                  And…it didn’t hit all of my e characters from the starting column block selection. Maybe try my example and see what you think.

                  @Alan-Kilborn said in [New plugin] Columns++:

                  Also, I felt a bit “uncomfortable” doing a bunch of Find Next s through a column-block that I could no longer see.

                  I made some significant changes to the way the search function works.

                  I followed the path on which you started me by mentioning indicators. Search now uses an indicator, rather than a selection, to define the region to be searched. You can (and usually would) still start with a rectangular selection, which is used to define the indicated region.

                  I could not find any way to know what indicators other plugins might be using (DSpellCheck, for example, just hard-codes 19); there does not seem to be any protocol for negotiating this between plugins. Consequently, I made it a user option; you can choose an indicator number to use (18 is default) or you can use the Find Mark indicator or one of the five Styles. Others’ experience will have to tell me whether this is a choice that mostly stays out of the way. Options for the “custom” indicator number and color are on the Options dialog.

                  The downside of all this is that it’s harder to explain. I think it makes sense once you use it, but I’m not quite sure folks are going to understand what is happening right off the bat.

                  The new stuff is in Pre-release 0.2.0.6-alpha.

                  By the way, was the issue you posted about stale text on the Search dialog resolved in subsequent releases?

                  Alan KilbornA 1 Reply Last reply Reply Quote 1
                  • Alan KilbornA
                    Alan Kilborn @Coises
                    last edited by Alan Kilborn

                    @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:

                    219e3e32-0640-4687-9044-318368bc1475-image.png


                    CoisesC 3 Replies Last reply Reply Quote 2
                    • CoisesC
                      Coises @Alan Kilborn
                      last edited by Coises

                      @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 KilbornA 1 Reply Last reply Reply Quote 0
                      • CoisesC
                        Coises @Alan Kilborn
                        last edited by

                        @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.

                        Alan KilbornA 1 Reply Last reply Reply Quote 0
                        • Alan KilbornA
                          Alan Kilborn @Coises
                          last edited by

                          @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.

                          1 Reply Last reply Reply Quote 0
                          • Alan KilbornA
                            Alan Kilborn @Coises
                            last edited by

                            @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:

                            3938de1f-6ce9-405d-8944-d6c11fb17f63-image.png

                            Continuing to press Replace in this situation merely keeps replacing the same T.

                            CoisesC 2 Replies Last reply Reply Quote 1
                            • CoisesC
                              Coises @Alan Kilborn
                              last edited by

                              @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.

                              1 Reply Last reply Reply Quote 0
                              • CoisesC
                                Coises @Alan Kilborn
                                last edited by

                                @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:

                                3938de1f-6ce9-405d-8944-d6c11fb17f63-image.png

                                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.

                                Alan KilbornA 1 Reply Last reply Reply Quote 0
                                • Alan KilbornA
                                  Alan Kilborn @Coises
                                  last edited by

                                  @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 of config.xml but that’s not an ideal solution.

                                  1 Reply Last reply Reply Quote 0
                                  • CoisesC
                                    Coises @Alan Kilborn
                                    last edited by

                                    @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:

                                    3938de1f-6ce9-405d-8944-d6c11fb17f63-image.png

                                    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.

                                    Alan KilbornA 1 Reply Last reply Reply Quote 3
                                    • Alan KilbornA
                                      Alan Kilborn @Coises
                                      last edited by

                                      This post is deleted!
                                      1 Reply Last reply Reply Quote 0
                                      • CoisesC
                                        Coises
                                        last edited by Coises

                                        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.

                                        1 Reply Last reply Reply Quote 3
                                        • CoisesC
                                          Coises
                                          last edited by

                                          Version 0.4-alpha improves performance with Elastic tabstops enabled, especially when using monospaced fonts.

                                          CoisesC 1 Reply Last reply Reply Quote 3
                                          • CoisesC
                                            Coises @Coises
                                            last edited by

                                            @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++.

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