Is there any way to select the text of the current line in Xcode? This would be equivalent to Cmd + l
in Sublime or V
in vim.
To select a line of text, place your cursor at the start of the line, and press Shift + down arrow. To select a paragraph, place your cursor at the start of the paragraph, and press Ctrl + Shift + down arrow.
Shift–Command–Down Arrow: Select the text between the insertion point and the end of the document. Shift–Command–Left Arrow: Select the text between the insertion point and the beginning of the current line. Shift–Command–Right Arrow: Select the text between the insertion point and the end of the current line.
Select an entire line of text by holding down the "Shift" key and pressing "End", if you are at the beginning of the line, or "Home" if you are at the end of the line. Select an entire paragraph by placing your cursor at either the beginning or the end of that paragraph.
Actually you can just use the normal Mac-Shortcuts.
Beginning of Line
cmd + shift + >
Middle of Line
1. cmd + > (this brings you to the end of the line)
2. cmd + shift + < (selects everything to the left)
End of Line
cmd + shift + <
Hope this helps :)
In Xcode 8, I have found the Select Line
keyboard binding which you can set to cmd+l (that's L
, not i
) for instance to make Xcode select the line you're on right now when hitting that shortcut.
You can actually assign a key command to this. In Xcode under Preferences > Key Bindings > Text search for "Select Line" and assign it to you preferred key command (I also prefer command-l
to match Sublime Text)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With