Community
    • Login

    Column Mode Indent?

    Scheduled Pinned Locked Moved General Discussion
    10 Posts 6 Posters 1.8k 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.
    • Jim GarrisonJ
      Jim Garrison
      last edited by

      This is something that is supported by almost all editors that support block selection (what NP++ calls Column Mode). Usually you select the block and then Tab or Shift-Tab move the contents of the selected block left or right.

      This seems to be missing in NP++ (or it’s well hidden). The above sequence just deletes the selected text block, and combinations of Alt, Shift and Ctrl with Tab or Left/Right don’t do anything.

      Is there a way to do this?

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

        @Jim-Garrison

        To achieve this, you need a zero-width column block.

        Lycan ThropeL 1 Reply Last reply Reply Quote 2
        • Lycan ThropeL
          Lycan Thrope @Alan Kilborn
          last edited by

          @Alan-Kilborn ,
          Now wait for the follow-up question… “What is a zero-width column?”
          :-)

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

            @Lycan-Thrope said in Column Mode Indent?:

            “What is a zero-width column?”

            Well, for the benefit of those that might not understand…

            If this is a column-block with a width of 4:

            7919cb86-3a1c-417b-b17f-29573ff65deb-image.png

            Then is it really that hard to grasp the concept that this is a column-block of width zero?:

            71256c98-765b-4c61-aece-6f6ba34c7b74-image.png

            Lycan ThropeL 1 Reply Last reply Reply Quote 3
            • Lycan ThropeL
              Lycan Thrope @Alan Kilborn
              last edited by

              @Alan-Kilborn ,
              :-)
              Best to head these questions off at the pass. If they won’t read the manual, it’s a good bet, they won’t understand the vernacular of terms used in the application.

              1 Reply Last reply Reply Quote 1
              • Aisha RizwanA
                Aisha Rizwan
                last edited by Aisha Rizwan

                Column mode indent is a feature that allows users to select and edit text in a columnar manner. This is useful for working with code, tables, or other types of text that require precise formatting. To use column mode indent in a text editor, the user typically needs to activate the feature by selecting a specific key combination or by accessing it through the editor’s menu or toolbar Once activated, the user can then select text in a columnar fashion by holding down the mouse button and dragging the cursor vertically or horizontally. This can save time and make it easier to work with text that requires a consistent layout.

                PeterJonesP 1 Reply Last reply Reply Quote -2
                • PeterJonesP
                  PeterJones @Aisha Rizwan
                  last edited by PeterJones

                  All,

                  Please do not post content generated by ChatGPT or other such systems. It is harmful, not helpful, to the Community.

                  In this specific case, the content was just completely unhelpful – presumably, it was generated by just typing in the title, rather than the content of the actual question, so it completely missed the point.

                  But because such AI systems have no fact-checking involved – all they do is, based on all their historical text training input, they guess what text is likely to come next. Based on that, they could easily give advice that is plain wrong or even dangerous to follow.

                  1 Reply Last reply Reply Quote 4
                  • Anonymous UserA
                    Anonymous User
                    last edited by

                    Old post, but this was the first I found when looking for this information myself. Since the commenters here were wholly unhelpful (and event downright derisive), I thought I should share a solution that actually worked.

                    In order to get Notepad++ to do tab manipulation similar to Visual Studio with block selection, all you need to do is bind the Tab key to Edit > Indent > Increase Line Indent. That’s it, with that change <Tab> and <Shift+Tab> works very similar to Visual Studio.

                    Instructions (in case you are unfamiliar with key binds in Notepad++)

                    1. Open Settings > Shortcut Mapper
                    2. In the Main Menu tab, scroll to “Increase Line Indent” (Was line 39 for me).
                    3. Double click the Shortcut column.
                    4. Select “Tab” from the drop down. (Fancy!) Hit OK.
                    5. If the line turns red, it means you have a conflict. For me there was a conflict with one of my plugins under the “Plugin Commands” tab. I just removed the plugin’s shortcut.
                    PeterJonesP 1 Reply Last reply Reply Quote 0
                    • PeterJonesP
                      PeterJones @Anonymous User
                      last edited by

                      Since the commenters here were wholly unhelpful (and event downright derisive)

                      I personally thought that @Alan-Kilborn and @Lycan-Thrope were both very helpful 2 years ago: one explained how to do it as tersely as possible, and the other prodded him to expand, trying to avoid assumptions about the understood terminology – and answering the question and prodding to make it easier to understand are not derisive in any way, shape, or form.

                      The closest to derision was my claim that a post that something as generic and unhelpful as “the user typically needs to activate the feature by selecting a specific key combination or by accessing it through the editor’s menu or toolbar” – that’s literally how you use a Windows program, yes, but it says nothing sepecific about the specific keystrokes or menu commands to use to accomplish the specific goal (whereas Alan did provide specifics) – was just calling out a reply that appeared to be LLM-created. I am sorry if you are offended that I call out unhelpful LLM posts as such (and nowadays, I’m less diplomatic, since LLM nonsense is expressly forbidden in this forum), but that’s one of my jobs as a moderator.

                      But on to the actual content:

                      In order to get Notepad++ to do tab manipulation similar to Visual Studio with block selection, all you need to do is bind the Tab key to Edit > Indent > Increase Line Indent.

                      Interesting. I cannot get that to do the same thing as VS:

                      First, to confirm what VS does:

                      1. Column/Rectangle/Block selection:
                        a1d1763b-39e9-4454-a058-6d25f2216100-image.png
                      2. TAB:
                        97bfc51d-d287-49bd-82bf-f3fbd69c4623-image.png

                      So VS does add indent at the start of the Column/Rectangle/Block.

                      Now let’s look at what N++ does “out of the box” with a Column/Rectangle/Block selection in the middle of a line:

                      1. Column/Rectangle/Block selection:
                        3e3fe79c-ae0a-4ab0-ad9c-7eb90892c8d8-image.png

                      2. Normal, unchanged TAB:
                        5d248285-46a6-4790-b4a3-c5639bc10aa3-image.png

                      This is the undesired behavior.

                      Now, instead, do what @Alan-Kilborn suggested in 2023:

                      1. do a zero-width column-mode selection instead of a multi-character column-mode selection:
                        3cc5a79c-63a6-436e-902b-0992aa057c17-image.png

                      2. Then hit TAB, and it will indent from that location, without deleting any characters:
                        30fb7403-b379-41d9-932c-866f80a2b9da-image.png

                      Now, to look at your suggestion

                      1. Change the Increase Line Indent to use the TAB key (and remove any conflicts elsewhere):
                        1f38f6d2-bc5a-4e53-b912-146f145b3e3a-image.png

                      2. Do the Column/Rectangle/Block selection in N++:
                        782acaac-b3d8-4c0d-b71f-879eb45f32fa-image.png

                      3. And then hit the newly-mapped TAB:
                        70b5473f-1625-422d-a31e-22dd52a51be8-image.png
                        … noticing that the results are the same as in step 4: it overwrites the characters.

                      So @Alan-Kilborn’s suggestion is able to mimic the results of VS, though the selection has to be a little different to get it to overwrite nothing.

                      Whereas Notepad++'s original behavior is identical to the behavior when I follow your instructions: it overwrites the selected text with the tab (or spaces, if you have space-indentation enabled in N++)

                      So did I miss something from your instructions? Or are you seeing different behavior with Notepad++ v8.8.5 than I am?

                      Anonymous UserA 1 Reply Last reply Reply Quote 1
                      • Anonymous UserA
                        Anonymous User @PeterJones
                        last edited by

                        @PeterJones Thanks for expanding on this! In my post I was frustrated that @Lycan-Thrope essentially said “RTFM” when the manual doesn’t seem to cover inserting tabs in column mode at all.

                        Based on your response, I think there may be a defect that lies somewhere between Notepad++ and interactions with plugins. I agree “Increase Line Indent” is not the same as Visual Studio and is not ideal, however the alternative I was seeing was much worse.

                        Prior to adding a shortcut to “Increase Line Indent”, the tab key would do absolutely nothing. I would press alt + shift and up or down arrows to make a selection (just like in VS), then press tab. Nothing happens at all. No change to the text. Caret doesn’t move. Just nothing happens. It definitely does not behave as you outlined in your very detailed post. (Thanks again!)

                        Web searches on this topic were frustrating. They mostly pull up posts or articles about Notepad++ tabs (or documents), rather than the tab key. The lack of writing about this particular topic may be additional data indicating some form of defect. Who is going to ask about this problem if they are not encountering it? Who is going to document how to press the tab key in this context? Just do it.

                        Should someone reading this be in a position to investigate a potential defect, here are details on my Notepad++ configuration. The plugin with the conflict for Tab was QuickText. Here is a screenshot of my Notepad++ version and installed plugins. I run Notepad++ on multiple machines, but am pretty quick to “copy paste” my plugin setup because it addresses other needs. I’ve observed this “unresponsive tab” issue on each of the other computers.

                        Plugins and Version.png

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