Topic
3 replies Latest Post - ‏2014-05-14T16:05:38Z by MichaelConrad
MichaelConrad
MichaelConrad
17 Posts
ACCEPTED ANSWER

Pinned topic Is there a way to shift a selected block one position in the COBOL or JCL editors?

‏2014-05-11T21:12:52Z |

Is there a way to shift a selected block one position in the COBOL or JCL editors?  Shift Right and Left (mapped to Toggle and Shift Toggle) look to be a tabbed shift (4 position).

ALT+7 and ALT+8 are the LPEX editor commands.

 

  • walexand
    walexand
    131 Posts
    ACCEPTED ANSWER

    Re: Is there a way to shift a selected block one position in the COBOL or JCL editors?

    ‏2014-05-13T18:06:56Z  in response to MichaelConrad

    I think what you are asking about can be accomplished by toggling into Block Selection Mode and selecting one character vertically down multiple lines, essentially making a large cursor that spans multiple lines.  Then insert however many spaces you want to shift the text over for all the lines. when finished just toggle out of Block Selection mode to return to normal editing mode.  Please see the second example in the attachment.

    • MichaelConrad
      MichaelConrad
      17 Posts
      ACCEPTED ANSWER

      Re: Is there a way to shift a selected block one position in the COBOL or JCL editors?

      ‏2014-05-14T16:05:38Z  in response to walexand

      Thanks.  I didn't realize the versatility of Block mode.

  • TFQC_Jeremy_Flicker
    TFQC_Jeremy_Flicker
    13 Posts
    ACCEPTED ANSWER

    Re: Is there a way to shift a selected block one position in the COBOL or JCL editors?

    ‏2014-05-13T21:12:32Z  in response to MichaelConrad

    Alternatively, if this is a feature you think you will use quite often, you could update the custom tab stops on the preference page COBOL > Editor, to be every column between 8 and 72.  Then when you select a range of text, pressing the Tab key will shift the selected text 1 column to the right, and pressing Shift+Tab will move the selected text one column to the left, all while preserving the location of the sequence numbers.

    If you want this behavior of the tab key for all types of editors, you can change the value of the preference "Displayed Tab Width" on preference page General > Editors > Text Editors to the value "1".

    If shifting is something you see yourself using often, this will pay off, as its fewer steps than the example above... which is also a useful trick to learn.