Community
    • Login

    Enhancement of the COLUMN EDITOR feature

    Scheduled Pinned Locked Moved General Discussion
    4 Posts 2 Posters 50 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.
    • guy038G
      guy038
      last edited by guy038

      Hello, All,

      In this topic, I would like to discuss about a possible improvement of the Column Editor feature… Let me explain :


      • Open any file

      • Put the caret, near the middle of current file, at any column N

      • Open the Column Editor feature

      • Choose the Text to Insert option or the Number to Insert option with pertinent parameters

      => Presently, the Column Editor feature will insert the text or the list of numbers, at column location N, throughout all the subsequent existing lines of the file.

      I propose an enhancement, with a new parameter, which would define the number of lines where the insertion of text or numbers would take place !


      An example will make this clearer. Let’s suppose this INPUT text :

      This is
      a simple example
      which shows how this new feature would act
      Througout all the lines of
      the current file
      
      

      Note the two emmpty lines at the very end of file

      • Now, I put the caret right before the word how, within the third line

      • I choose the Edit > Colum Editor... option

      • I select, let’s say, the Text to Insert option, containing the sentence This is a test

      +> After a click on the OK button, the OUTPUT text is presently changed as :

      This is
      a simple example
      which shows This is a testhow this new feature would act
      Througout alThis is a testl the lines of
      the current This is a testfile
                  This is a test
                  This is a test
      

      Now, let’s imagine a new parameter, part of the Column Editor dialog, named Total Insertion Number, filled with the number 15

      Then, it would add the text This is a test 15 times, and would produce the following OUTPUT text :

      This is
      a simple example
      which shows This is a testhow this new feature would act
      Througout alThis is a testl the lines of
      the current This is a testfile
                  This is a test
                  This is a test
                  This is a test
                  This is a test
                  This is a test
                  This is a test
                  This is a test
                  This is a test
                  This is a test
                  This is a test
                  This is a test
                  This is a test
      

      In other words :

      • It would act as usual as long as a current line exists in current file

      • It would add some lines, till the limit of 15, when no more line exists in current file

      Of course, so as not to interfere with a possible column-mode selection or multi-selections, the use of this new capability would be allowed ONLY IF no initial selection exists, so ONLY IF a simgle caret is present, whatever its location in current file !


      An other example could be :

      • You put the caret on the last empty line of a file

      • You open the Column Editor

      • For the new parameter, you choose, let’s say, the 100 number

      => 100 lines would be appended to the file with, either, the inserted text OR list of numbers


      Do you think that this enhancement seems sensible ? I need your feedback before a possible pull request on GitHub !

      Best Regards,

      guy038

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

        @guy038 said:

        I need your feedback before a possible pull request on GitHub !

        I think you mean before you “create an issue on GitHub”.


        Feedback:

        If I wanted to limit the lines for the common text insertion, I would create an empty column selection (what I call a “tall skinny caret”) over the lines to be affected, before invoking the column editor feature. If I do that, and then specify the insert text, what results is only on the lines touching the original selection.

        1 Reply Last reply Reply Quote 0
        • guy038G
          guy038
          last edited by guy038

          @alan-kilborn and All,

          First, sorry for my approximative translation !

          Now, regarding the enhancement of the Column Editor feature, maybe I didn’t make myself clear !

          If you consider my second example of my previous post :

          • You put the caret on the last empty line of a file
          • You open the Column Editor
          • For the new parameter, you choose, let’s say, the number 100

          => Immediately, 100 lines would be appended with, either, the inserted text OR the list of numbers

          There is no mean to achieve such a goal with the present Column Editor feature ! Do you agree with my statement ?

          BR

          guy038

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

            @guy038 said:

            There is no mean to achieve such a goal with the present Column Editor feature ! Do you agree with my statement ?

            Yes, but I don’t know that functionality is lacking enough for someone to develop the new feature. Unless, say, you yourself are going to give implementation a try?

            What I would do, instead, for your “second example” would be to manually create the line I want, on a new blank line at end-of-file and then just hold down my keycombo for duplicating a line until the line is copied as many times as I want (e.g. 100). Now, key repeat is likely to make me go over the amount needed slightly, but pressing the delete-line keycombo a few times is an easy repair. Very fast for me, rather than invoking the column editor and then fussing with its controls.

            TL;DR: Your desired feature is okay, but not life-changing for me. :-)

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