• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Finders, Keepers: Long Lost RSE Keyboard Shortcuts

    March 29, 2016 Susan Gantner

    If you have read many of my past Four Hundred Guru tips, you’ll remember that I write a lot about RSE (a.k.a. RDi) and particularly I write a lot about keyboard shortcuts. I’ve even created my own card with my favorite keyboard shortcuts. This tip is to confess that I’ve recently realized that I’ve been missing out on a set of shortcuts that I should have been using and including on my shortcut cards all along.

    I published a tip about a year ago about Playing with Blocks and I included an edited version of that tip on the back of my latest Favorite Keyboard Shortcuts card. Now I realize that I omitted some shortcuts from that tip that would have made things even easier for some parts of it.

    The original tip was about selecting blocks of code, and my favorite way to do that most of the time is using Alt+L. Then I talked about things I might do with the selected blocks of code. One of the most obvious things to do with a block is to copy or move it. My original tip suggested using the standard Windows shortcuts to copy or cut–Ctrl+C or Ctrl+X–followed by paste–Ctrl+V.

    There’s nothing wrong with copying or moving code that way. It works and I’ve been doing it that way for years. But I’ve had a few people ask me recently why I don’t use Alt+C or Alt+M. The real answer to that question was “because I didn’t realize how they work!” For some reason, I was convinced that those were simply alternative keys that behaved the same as the Windows shortcuts I had been using, so I didn’t see any reason to do things differently in RDi than what I do with all my other applications.

    Then one day, I tried it out and found that there is indeed a difference and I must confess that I am now regularly using Alt+C and Alt+M. So for those who don’t know about these particular shortcuts (perhaps because you learned most of your shortcuts from me), allow me to introduce you to yet another way to copy/cut and paste code from one place to another. It works just a little differently from the standard Windows shortcut method so I’ll describe the behavioral differences.

    The most obvious difference with this method is that once you have your code selection marked, you don’t need to specifically copy (or cut) and then paste. Instead you simply position to the location where the code is to go and you use either Alt+C to copy the code or Alt+M to move the code block. So after marking your selection, instead of two actions (e.g., Ctrl+C followed by Ctrl+V) you just Alt+C or Alt+M at the destination. This works to move or copy code between source members (I usually do that in split screen editor mode) as well as within a source member.

    When using the Alt+C or Alt+M shortcuts, the code at the destination is inserted after the position of your cursor. This differs from the Ctrl+V behavior that pastes before the cursor position. That took me a bit of getting used to!

    Another difference with the Alt+C/Alt+M method of pasting is that the pasted code remains selected after the paste action. This comes in handy especially when pasting a block of free form logic from one member to another but where the code needs to be subsequently shifted a bit left or right to get the appropriate indentation level. With the just-pasted lines of code still selected, you can now simply use Alt+F7 to shift left or Alt+F8 to shift right. You can, of course, de-select the pasted code using your favorite method. I typically double click.

    One thing that both the methods have in common is that both Ctrl+V and Alt+C/Alt+M will push existing code aside to make room for the code being pasted. Most of the time this is exactly what I want so I don’t need to make room for the pasted code first.

    However, every once in a while I do want it to overlay the paste location rather than to push the destination code out of the way. This is particularly useful when I’m not copying full lines of code, but rather just a column. For example, maybe I may want to copy a column of variable names from where they are defined on D specs to some other location, either for use elsewhere in a similar declaration or in logic that will work with those fields.

    Selecting the column (or rectangle) of code is done by Alt+R, followed by a second Alt+R in the diagonally opposite corner of the column. Using my old method of pasting with Ctrl+C, Ctrl+V, the column doesn’t remain lined up as a column at all. Using the Alt+C method, it remains lined up but it shifts the rest of the code on the lines, which may not always be desirable, especially if the paste is happening into fixed format specs.

    There is another paste shortcut you can use–Alt+Z–that will paste as Alt+C does but it will overlay whatever code is currently in the space rather than inserting and shifting the existing code out of the way.

    So there you have it! Even more ways to play with blocks of code using RDi.

    Susan Gantner is half of Partner400, a consulting company focused on education on modern programming and database techniques and tools on the IBM i platform. She is also a founding partner in System i Developer, a consortium of System i educators and hosts of the RPG & DB2 Summit conferences. Susan was a programmer for corporations in Atlanta, Georgia, before joining IBM. During her IBM career, she worked in both the Rochester and Toronto labs, providing technical support and education for application developers. Susan left IBM in 1999 to devote more time to teaching and consulting. Together with Jon Paris, she now runs Partner400, and appears regularly at many technical conferences, including System i Developer’s RPG & DB2 Summit. Send your questions or comments for Susan to Ted Holt via the IT Jungle Contact page.

    RELATED STORIES

    Updated RDi Keyboard Shortcuts

    A Fastpath To Open A Specific Member In RSE

    Everybody Likes Shortcuts! Part 2, Playing With Blocks

    Everybody Likes Shortcuts! Part 1, Navigation

    My Favorite Keyboard Shortcuts for RSE

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    Maxava

    Migrating to a new IBM Power System?

    Whether it be Power8, Power9 or Power10 – Maxava has you covered

    Our migration service moves data from the old to the new server without disruption while the business continues to operate without impacting performance. Our service avoids long periods of downtime and means businesses can reduce the risk of moving to new hardware.

    To learn more about Maxava’s migration service, call us on 888 400 1541 or VISIT maxava.com

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Sponsored Links

    COMMON:  2016 Annual Meeting & Expo, May 15 - 18, in New Orleans! Great Power Systems event!
    iTech Solutions:  Get your copy of Pete Massiello's The IBM i State of the Union report now!
    NGS:  Webinar: Getting from ? to ! with NGS-IQ - April 5. RSVP Now!

    Healthcare Tech Trends Shape Industry And IBM i X Marks The Spot

    Leave a Reply Cancel reply

Volume 16, Number 07 -- March 29, 2016
THIS ISSUE SPONSORED BY:

WorksRight Software
T.L. Ashford
Bug Busters Software Engineering

Table of Contents

  • Installing PHP on Your Laptop
  • Ease the Burden of Overloading
  • Finders, Keepers: Long Lost RSE Keyboard Shortcuts

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • COMMON Set for First Annual Conference in Three Years
  • API Operations Management for Safe, Powerful, and High Performance APIs
  • What’s New in IBM i Services and Networking
  • Four Hundred Monitor, May 18
  • IBM i PTF Guide, Volume 24, Number 20
  • IBM i 7.3 TR12: The Non-TR Tech Refresh
  • IBM i Integration Elevates Operational Query and Analytics
  • Simplified IBM i Stack Bundling Ahead Of Subscription Pricing
  • More Price Hikes From IBM, Now For High End Storage
  • Big Blue Readies Power10 And IBM i 7.5 Training for Partners

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2022 IT Jungle

loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.