How to Loop Action in MultiSelctionLine?

How to Loop Action in MultiSelctionLine?

2
NewbieNewbie
2

    Dec 28, 2004#1

    Help~~
    I encounter a problem.
    When I select multiLines in UE, I want to add a String "'//" to start postion of each line I was selcted.

    I wonder if the UE macros can do it?

    e.g.
    AAAAAAAA
    BBBBBBBB
    CCCCCCC
    DDDDDDD

    When I Select the middle two lines, my expectant results is
    AAAAAAAA
    '//BBBBBBBB
    '//CCCCCCC
    DDDDDDD

    Help!!

    6,604548
    Grand MasterGrand Master
    6,604548

      Dec 28, 2004#2

      If you have syntax highlighting active for this and line comment is defined with '//, simply use Comment Add from menu Edit.

      But here is also the macro for that job:

      InsertMode
      ColumnModeOff
      HexOff
      UnixReOff
      Find RegExp "%^(?^)"
      Replace All SelectText "'//^1"
      Best regards from an UC/UE/UES for Windows user from Austria

      2
      NewbieNewbie
      2

        Dec 29, 2004#3

        Thank you for help!
        Your Macros is well done!

        Any way, I have another corresponding problem, I need another macro to remove the comment.
        for example:

        AAAAAAA
        '//BBBBBB
        '//CCCCCC include several space
        '//'//DDDD'//
        EEEEEEEE

        when i multiSelect the five lines above, my expectant results is :
        AAAAAAA
        BBBBBB
        CCCCCC include several space
        '//DDDD'//
        EEEEEEEE

        It only remove first comment string for each line!
        Please help again, I just a new user!
        Thank

        6,604548
        Grand MasterGrand Master
        6,604548

          Dec 30, 2004#4

          Same method for removing as for adding:

          InsertMode
          ColumnModeOff
          HexOff
          UnixReOff
          Find RegExp "%'//"
          Replace All SelectText ""
          Best regards from an UC/UE/UES for Windows user from Austria