Move to beginning of text in Xcode

前端 未结 9 2049
说谎
说谎 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:20

    It seems that the simplest way, as already mentioned is

    1) Go to the beginning of the line (Cmd + left arrow key)

    2) Jump to right word (Alt + right arrow key)

    3) Jump to left word (Alt + left arrow key)

    Unfortunately (Alt + left arrow key) and (Alt + right arrow key) ignores comments, brackets, etc and therefore the method above will not always work. If this is not a problem, then there is also one solution for the BetterTouchTool users. One can create a sequence of actions (commands) that will be called one after another and assign it to Home button. To do so, open the preferences, go to Keyboard tab, Add new shortcut and assign Home button to the (Cmd + left arrow key). Then click Assign additional actions twice, first one for the (Alt + right arrow key) and the second one for the (Alt + left arrow) key commands.

    Hopefully this helps.

提交回复
热议问题