ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Shift right on paste

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Shift right on paste

    Is there a way to stop RDI from shifting code to the right when pasting. Is that a preference

  • #2
    Not sure what you mean, when I copy and paste it puts it where ever I put my cursor. A couple of things I can think of would be if you are trying to do a block copy and paste from a green screen session, might do something weird. There are some code formatting options in RDI though it has nothing to do with copy and paste but for example after I paste in sql code it formats it for me and moves it around, that might be what you are seeing.

    Comment


    • gregwga50
      gregwga50 commented
      Editing a comment
      Yes, it places the the code from the clipboard wherever the cursor is, but it shifts everything that was were the cursor is to the right,by the length of whatever text is in the clipboard

      e.g. If position 21 -30 contains 1234567890 and I copy // to the clipboard and place the cursor at pos 21 and press ctrl+v, then pos 21-30 now contain //12345678 instead of //34567890. SEU doesn't work this way. In SEU, the contents of the clipboard would overlay the text starting at the cursor position. I thought maybe the insert key may control whether text is overlayed or shifted in RDI but it doesn't seem to matter. This is frustrating because if I am pasting some text in a portion of the code that is not free-format (like F or D specs), I then have to go back in and re-align things to get rid of the syntax errrors caused by the shift

  • #3
    What it is, is that by default copy and pasting in green screen is by block copy and pasting automatically overlays. Windows applications, not so much. But you can in RDI by using the alt-r to set the beginning of the cursor and then alt-r to set the end of the block, ctrl-c to copy the block, and then set your cursor where you want and hit alt-z to overlay the selection onto your current source.

    I have not been able to find a way to do this from the green screen to RDI though. But if both sources are open in RDI shouldn't be an issue. But if sources are open in RDI the copy and pasting should work better in general.

    A couple of other tricks I use is that when I put in a block of text that gets misaligned like that, I use the block copy to highlight the first character of each line and then alt-f8 to shift the block over to the proper column.

    Also when pasting I use the shift arrow key to highlight the proper number of characters to replace when doing a paste, this works well for single line pasting but not multi line.

    There may be more ways though, these are just the ones I have found.

    Comment

    Working...
    X