• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Keyboard shortcut to jump to first non-blank character in line?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: Cecelia <email@hidden>
  • Date: Fri, 21 Aug 2009 10:52:37 -0700

My apologies. This behavior is different in TextWrangler (Which I checked for Cocoa Text functionality as I didn't have Xcode open.) Command+Left Arrow, Option+Right Arrow would work in this program, but not Xcode.

Cecelia


On 8/21/09 10:25 AM, Andy Lee wrote:
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 keystro
ke 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:

  

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

References: 
 >Re: Keyboard shortcut to jump to first non-blank character in line? (From: ccsccs7 <email@hidden>)
 >Re: Keyboard shortcut to jump to first non-blank character in line? (From: Howard Moon <email@hidden>)
 >Re: Keyboard shortcut to jump to first non-blank character in line? (From: Andy Lee <email@hidden>)

  • Prev by Date: Re: Keyboard shortcut to jump to first non-blank character in line?
  • Next by Date: Re: Keyboard shortcut to jump to first non-blank character in line?
  • Previous by thread: Re: Keyboard shortcut to jump to first non-blank character in line?
  • Next by thread: Re: Keyboard shortcut to jump to first non-blank character in line?
  • Index(es):
    • Date
    • Thread