Simple indent macro

Simple indent macro

3
NewbieNewbie
3

    Mar 17, 2005#1

    I am having trouble creating a simple macro that indents a currently selected block. I have tried RunTool with "Indent", "Indent Current Selection" and a few other combinations and I can't seem to get the correct syntax. Has someone done this and can you tell me what I need in order to create a "working" macro for indent (and UnIndent) for a selected block??

    TIA

    206
    MasterMaster
    206

      Mar 17, 2005#2

      If you're not using word wrap, have you tried selecting a block and hitting the Tab key? That works well for me
      Software For Metalworking
      http://closetolerancesoftware.com

      3
      NewbieNewbie
      3

        Mar 17, 2005#3

        I wanted to indent by 1 column (space) at a time to align blocks of text.. Shift Tab moves it further than I wanted.

        206
        MasterMaster
        206

          Mar 17, 2005#4

          How about selecting the block, then clicking Format > Add Indents

          It defaults to 1 space but that can be overridden - would be more flexible than a macro.

          If it works, you could put a button on your toolbar and make it easy to access.
          Software For Metalworking
          http://closetolerancesoftware.com

          3
          NewbieNewbie
          3

            Mar 17, 2005#5

            I guess I was just interestedin how to get the syntax for something like that to work. I have since found an alternative method that satisfied my requirement. If anyone can post an example of a macro for indenting a previously selected block, I would appreciated it (as an educational point).

            206
            MasterMaster
            206

              Mar 17, 2005#6

              Try this with Unix regular expression mode turned on.

              InsertMode
              ColumnModeOff
              HexOff
              UnixReOn
              Find RegExp "^"
              Replace All SelectText " "
              Software For Metalworking
              http://closetolerancesoftware.com