Thanks Matt


On 4/7/2017 7:33 PM, Tyler, Matt wrote:
Not really. Moving left is quite different than moving right (ALT+F7 TRUNCATES as you move left!!!!). The examples were mostly about using R|RR so I was mentioning ALT+F8. Using ALT+F7 and L|LL|LT|LLT all seem to be the same net effect with the same amount of effort. I just happen to be more accustomed to using the block functions over the prefix commands.

Also, I refrain from right side comments when possible as they tended to be too simplistic to really comment or become out dated over time. I code in favor of using meaningful names with my reasoning's beforehand if it's to that clear. I will move or remove right hand comments often.

Oh, and I get to code in free form syntax so I have no need to worry about the right and fixed comments staying there.

To do what you want to do you block highlight your code then move your cursor to the upper left corner and then use ALT+M.

-Matt

-----Original Message-----
From: WDSCI-L [mailto:wdsci-l-bounces@xxxxxxxxxxxx] On Behalf Of Robert Rogerson
Sent: Friday, April 7, 2017 5:19 PM
To: Rational Developer for IBM i / Websphere Development Studio Client for System i & iSeries <wdsci-l@xxxxxxxxxxxx>
Subject: Re: [WDSCI-L] Shortcuts Indent/Unindent

Hi Matt, I just had occasion to try what I think you were saying. I wanted to move a block of code two spaces to the left. So I only blocked the code I wanted moved and used ALT-F7 to move it two spaces to the left. The right hand comments (in column 70) were also shifted two spaces left although these were not included in the section of code I had blocked.

Are you telling me that if you do the same thing the comments in column
70 would not be moved? No biggy, just curious...

Thanks,

Rob


On 4/7/2017 11:31 AM, Tyler, Matt wrote:
That works for the entire line but when you need to move blocks of code that don't include the entire line using ALT+F7, F8 work better.

I find that ALT+F8 is better than RR2 for shifting code because I can do it until I want to stop and not lose the capability to repeat the action without having to re key the command. For instance, I have a function that when filled out with all the params extends past the end of the source line. I split the line and then [have to] move it to line up with the function call. I don't always know the number of spaces to use for this indent, so pressing ALT+R then ALT+F8 repeated until its where I want works best.

Also, R|RR don't tell you about source line overflows to the right until later, whereas ALT+F8 you can know as soon as you pass one character past the length of the source line.

-Matt

-----Original Message-----
From: WDSCI-L [mailto:wdsci-l-bounces@xxxxxxxxxxxx] On Behalf Of
Robert Rogerson
Sent: Friday, April 7, 2017 8:37 AM
To: Rational Developer for IBM i / Websphere Development Studio Client
for System i & iSeries <wdsci-l@xxxxxxxxxxxx>
Subject: Re: [WDSCI-L] Shortcuts Indent/Unindent

I realize my input is a little late in this thread but I thought I'd offer another solution that if already suggested I apologize.

I too use ALT-R to begin the top left of the block and either ALT-R or the cursor to mark the bottom right of the block. Then ALT-F7 or ALT-F8 to shift the block.

But a colleague suggested or asked why I didn't just use the SEU command RRn to shift the block. I type RR2 on the first line to indent and RR2 on the last line to indent and press ENTER. That's it. I've used it a few times now and actually find it faster.

Just an alternative....

Rob


On 3/30/2017 2:42 AM, Thomas Raddatz wrote:
Nice hint that works nicely for me at a first glance, but does not use the number of blanks specified for "Automatic indent" of the "ILE RPG" preferences page. At least for me it uses 2 blanks for indention, although I specified 3 blanks for "Automatic indent".

Last but not least Ctrl+M seems to use block selection so that I have to press Alt+U to unselect the block. So the there are 3 steps for indenting a block:

1) Ctrl+M to select the source lines.
2) Ctrl+Shift+F to format the selected lines.
3) Alt+U to remove the selection.

The good news are that Ctrl+Shift+F also works with stream selection. On the other hand that raises the question why Alt+7 and Alt+F8 (indent/unindent) do not work with stream selection. They only had to pick up the line numbers where the selection starts and ends in oder to know the lines to indent/unindent. Simple and intuitive.

It is pretty much annoying that I always have to remember what selection I have to use for what function: Block, line, rectangle or stream selection.

Sigh - Either I am getting old or stupid or it is because I never used Code400, WDSCi and RDi for editing fix format RPG (except the D-specs, of course).
Thomas.


-----Ursprüngliche Nachricht-----
Von: WDSCI-L [mailto:wdsci-l-bounces@xxxxxxxxxxxx] Im Auftrag von
daveshawmrc@xxxxxxxxx
Gesendet: Dienstag, 28. März 2017 22:52
An: wdsci-l@xxxxxxxxxxxx
Betreff: Re: [WDSCI-L] Shortcuts Indent/Unindent

After selecting the block with Ctrl-M, Ctrl-shift-f to format the block takes care of the indenting nicely.

Dave Shaw
Sent from Mail for Windows 10

From: Jose Luis Hernandez Riesgo
Sent: Tuesday, March 28, 2017 4:47 PM
To: wdsci-l@xxxxxxxxxxxx
Subject: Re: [WDSCI-L] Shortcuts Indent/Unindent

Hi

I know that this tricks aren't really about indent/unindent, but i think they are very useful for to be able see the begin/end of block if/do/select....

Ctrl + M in the begin/end of the block this mark all block and you can see all.

Ctrl + Shift + M in the begin of block and you go directly at end statement. And reverse too.

--
This is the Rational Developer for IBM i / Websphere Development
Studio Client for System i & iSeries (WDSCI-L) mailing list To post
a message email: WDSCI-L@xxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/wdsci-l.
--
IMPORTANT NOTICE:
This email is confidential, may be legally privileged, and is for the intended recipient only. Access, disclosure, copying, distribution, or reliance on any of it by anyone else is prohibited and may be a criminal offence. Please delete if obtained in error and email confirmation to the sender.

--
This is the Rational Developer for IBM i / Websphere Development
Studio Client for System i & iSeries (WDSCI-L) mailing list To post a
message email: WDSCI-L@xxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/wdsci-l.
--
This is the Rational Developer for IBM i / Websphere Development Studio Client for System i & iSeries (WDSCI-L) mailing list To post a message email: WDSCI-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/wdsci-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.