Move to beginning of text in Xcode

前端 未结 9 2152
说谎
说谎 2020-12-23 16:18

I know I can bind keys to \"Move to beginning of line\", but this ignores the indentation.

What I\'m looking for is to move to the beginning of text on a line, so th

9条回答
  •  伪装坚强ぢ
    2020-12-23 17:17

    I don't have an exact solution, just one slight improvement for Xcode 4. You could set up a keyboard mapping for "Move Expression Left" (Xcode prefs > Key Bindings), which is a little more than Opt ←:

    s = [NSString string] |
    

    if | is the cursor position, pressing a "Move Expression Left" keystroke will bring it to the beginning of the expression on the left of it, so in that case before "[NSString". Opt ← will only move before "string".

    (Side note: I do see an action command called "Move to Left end of line" and another one called "Move to beginning of line." To my experience, these do exactly the same behavior in Xcode 4.0.2: this looks to me like a bug, unless I'm missing something.)

提交回复
热议问题