• Login
Community
  • Login

How to rename blocks of a program in notepad ++?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
7 Posts 3 Posters 5.0k 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.
  • R
    Rogério Ferreira
    last edited by Feb 5, 2016, 4:22 PM

    Hello everybody,

    I am using the notepad ++ to modify some cnc programs, so I have inserted some new blocks in one of this programs, then I would like to know how to rename the blocks automatically, is that possible?

    C F 2 Replies Last reply Feb 5, 2016, 4:39 PM Reply Quote 0
    • C
      Claudia Frank @Rogério Ferreira
      last edited by Feb 5, 2016, 4:39 PM

      @Rogério-Ferreira

      not quite sure what you are requesting, can you give as an example of
      what you have and what you want to have?

      Cheers
      Claudia

      1 Reply Last reply Reply Quote 0
      • R
        Rogério Ferreira
        last edited by Feb 5, 2016, 5:06 PM

        Thank you in advance for your help.

        For example, I have the following blocks of a cnc program:

        N1400 G01 Z=R451+R90 F=500 ;COTA Z PISTA SUPERIOR
        N1410 STOPRE
        N1420 M92 ;RESET ANALOGICAS PIST NOVA

        and I want to introduce two new blocks (lines) and rename automatically all blocks in ascending order, for example:
        N1400 G01 Z=R451+R90 F=500 ;COTA Z PISTA SUPERIOR
        N1410 STOPRE
        N1420 G04 F10 ; (NEW BlOCK)
        N1430 STOPRE ; (NEW BLOCK)
        N1440 M92 ;RESET ANALOGICAS PIST NOVA

        C 1 Reply Last reply Feb 5, 2016, 5:16 PM Reply Quote 0
        • C
          Claudia Frank @Rogério Ferreira
          last edited by Feb 5, 2016, 5:16 PM

          @Rogério-Ferreira

          out of the box - this could be, better I should say I assume this could be, achieved with some heavy regular expressions but
          when installing a npp scripting language plugin like python, java script, lua etc… we could find a way to automate this.

          Cheers
          Claudia

          1 Reply Last reply Reply Quote 0
          • R
            Rogério Ferreira
            last edited by Feb 5, 2016, 5:27 PM

            @Claudia-Frank

            I thought It was easier, I thought It was already a notepad ++ resource.

            Thank you again.

            C 1 Reply Last reply Feb 5, 2016, 5:42 PM Reply Quote 0
            • C
              Claudia Frank @Rogério Ferreira
              last edited by Feb 5, 2016, 5:42 PM

              @Rogério-Ferreira

              there is one other solution which maybe suits you.
              With holding alt+shift you can use the arrow keys to select a block of text, alt+left mouse is the same.
              Once done, pressing alt+c opens the block editor mode and there you can insert numbers with a defined stepping.

              Cheers
              Claudia

              1 Reply Last reply Reply Quote 0
              • F
                fade2gray @Rogério Ferreira
                last edited by Feb 6, 2016, 5:23 PM

                @Rogério-Ferreira

                Short video clip may help https://youtu.be/8p4S8vsEjRo

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