I come from Windows world and used Visual Studio for years. When I click [Home] in Visual Studio, it means “move input cursor to the beginning of the first non-space character of the current line” (not the beginning of the line).
e.g.
class Foo {
public:
void bar();
};
In Visual Studio, if the cursor is at line void bar(); and I click [Home], the cursor will move to the front of character ‘v’ instead of the beginning of the line.
Is there a keyboard shortcut in Xcode?
I have forever trying to find a way to do so too…
and basically you cannot. (maybe some hacking way would enable it..?)
from XCode Preference / Key Bindings
search for “move to”
and try everything you find. NONE of them will move cursor to first visible char of line.
XCode (and standard textboxes in OSX) seems to have similar cursor movement setup like emacs standard setup.
closest and fastest way you can do is move to first non-punctuation char by these key combinations:
⌘ ←, ⌥ →, ⌥ ←
however it does get little annoying when you code in objective-C
where you may have a number of leading open square brackets (punctuation char)….
I’d suggest move your hand to your pointing device (eg. mouse) for that situation…
Please emacs/xcode masters, flame me for my lack of knowledge
emacs cannot move cursor to first visible char of line in one key combination!!
(I am dying to know I am wrong!)