Topic
  • 3 replies
  • Latest Post - ‏2014-05-14T16:05:38Z by MichaelConrad
MichaelConrad
MichaelConrad
22 Posts

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
    138 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  

    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.

  • walexand
    walexand
    138 Posts

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

    ‏2014-05-13T18:06:56Z  

    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.

  • TFQC_Jeremy_Flicker
    TFQC_Jeremy_Flicker
    13 Posts

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

    ‏2014-05-13T21:12:32Z  

    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.

  • MichaelConrad
    MichaelConrad
    22 Posts

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

    ‏2014-05-14T16:05:38Z  
    • walexand
    • ‏2014-05-13T18:06:56Z

    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.

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