• Login
Community
  • Login

spaces tabs

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
6 Posts 3 Posters 3.3k 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.
  • J
    James Dunn
    last edited by Oct 4, 2019, 10:26 PM

    Is there a way to replace the 3 spaces with tab character without visiting each line and manually replacing them. Thanks.

    1 Reply Last reply Reply Quote 0
    • P
      PeterJones
      last edited by Oct 4, 2019, 11:55 PM

      Edit > Blank Operations > Space to TAB (all) or Space to TAB (leading) might do what you want.

      Otherwise, a regular expression could do it

      • find \x20{3} replace \t – anywhere in the line
      • find ^\x20{3} replace \t – only at the beginning

      If you’ve got more than one group of three spaces, the regex would have to be adjusted, whereas the Space to TAB should handle that automatically.

      A J 2 Replies Last reply Oct 5, 2019, 1:57 AM Reply Quote 1
      • A
        Alan Kilborn @PeterJones
        last edited by Oct 5, 2019, 1:57 AM

        @PeterJones said in spaces tabs:

        Edit > Blank Operations > Space to TAB (all) or Space to TAB (leading) might do what you want.

        Might is very accurate with this method. It will depend upon your setting for how many spaces a tab represents, found in the Preferences. The regular expression replacement method will work without regard to any setup.

        J 1 Reply Last reply Oct 5, 2019, 4:25 PM Reply Quote 1
        • J
          James Dunn @PeterJones
          last edited by Oct 5, 2019, 4:05 PM

          @PeterJones Space to Tab (leading) took care almost all of them. Thanks.

          1 Reply Last reply Reply Quote 1
          • J
            James Dunn @Alan Kilborn
            last edited by Oct 5, 2019, 4:25 PM

            @Alan-Kilborn Space to Tab (leading) took care almost all of them. Space to tab (all) works as well. Thanks.

            A 1 Reply Last reply Oct 5, 2019, 6:53 PM Reply Quote 0
            • A
              Alan Kilborn @James Dunn
              last edited by Oct 5, 2019, 6:53 PM

              @James-Dunn said in spaces tabs:

              Space to Tab (leading) took care almost all of them. Space to tab (all) works as well.

              If it works then it must be that you have a setting of 3 spaces for each tab in your Preferences.

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