Re: Keyboard shortcut to jump to first non-blank character in line?
Re: Keyboard shortcut to jump to first non-blank character in line?
- Subject: Re: Keyboard shortcut to jump to first non-blank character in line?
- From: Andy Lee <email@hidden>
- Date: Fri, 21 Aug 2009 13:25:21 -0400
Exactly -- those are the standard Mac shortcuts for jumping back or ahead a word, and unfortunately they don't help. Option-Right jumps *over* the next word, and Option-Left skips punctuation, so if I'm in the middle of the line "[self goToLunch];", I can use Option-Left to position the cursor just before "self", but not just before the opening "[". True, if all I'm doing is inserting a "[" anyway, this doesn't matter, but suppose what I wanted was to change that to "(void)[self goToLunch];" to remind myself that goToLunch has a return value that I'm discarding. Also, using these Option+Arrow keys still requires multiple keystrokes. I'd much prefer a single keystroke or at most two.
I would be willing to install keyboard macro software and map a key to some combination of modifier+arrow keys, but I don't think any such combination is possible. It would probably have to be done with some kind of script (maybe using FastScripts) or a Service.
I believe in Eclipse I could go to the beginning of the line and Tab would skip over the whitespace. I'd like an option like that in Xcode, and will file a Radar if I don't come up with a solution.
--Andy
On Friday, August 21, 2009, at 01:11PM, "Howard Moon" <email@hidden> wrote:
> _______________________________________________
>Do not post admin requests to the list. They will be ignored.
>Xcode-users mailing list (email@hidden)
>Help/Unsubscribe/Update your Subscription:
>
>This email sent to email@hidden
>
That doesn't do quite what he asked. Option-right-arrow will jump to the end of the next token, not the end of the preceding white space. You can use Option-right-arrow followed by Option-left-arrow, and it will take you to the start of the first token (but if there are preceding braces, etc., then you'll still need to arrow left to move to before those).
-Howard
On Aug 21, 2009, at 10:04 AM, ccsccs7 wrote:
Have you tried Option+(Left/Right) Arrow?
Cecelia
--- On Fri, 8/21/09, Andy Lee <email@hidden> wrote:
From: Andy Lee <email@hidden> Subject: Keyboard shortcut to jump to first non-blank character in line? To: "Xcode Users" <email@hidden> Date: Friday, August 21, 2009, 9:57 AM
Is there a keyboard shortcut to position the text cursor just after all leading whitespace in the current line? For example, I sometimes want to do this to insert a new opening square bracket when I realize I need to nest a message. In my source code at work, I've been using Control-A followed by zero or more Control-F's to skip over the leading tabs. But in my home code, I use leading spaces, and this gets tedious.…
--Andy
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden