Keyboard shortcut to select the current line in Xcode

Is there a way to select the text of the current line in Xcode? This would be equivalent to Cmd + l in Sublime or V in vim.

+6
source share
2 answers

In fact, you can just use regular Mac-Shortcuts.

Start line
cmd + shift + ->

Midline
1. cmd + -> (this will lead you to the end of the line)
2. cmd + shift + <- (selects everything to the left)

End of line
cmd + shift + <-

Hope this helps :)


Update

In Xcode 8, I found a Select Line keyboard binding that you can set to cmd-l , for example, so that Xcode selects the line you are currently on when you click this shortcut.

key binding in xcode settings

+9
source

In fact, you can assign him a key team. In Xcode, under Preferences> Key Bindings> Text Search, select Select Line and assign it to your preferred key command (I also prefer command-l match Sublime Text)

enter image description here

+2
source

Source: https://habr.com/ru/post/973870/


All Articles