In Vim, ^
can move the cursor to the first word (non white space) of the line, for example
The quick brown fox jumps over the lazy dog
here ^
in Vim will move to T of The, but in Emacs, how to move cursor to the first word (non white space) of the line instead of using a series of M-b/f and C-a/e/b/f? Is there any existing command to make it?
Thanks
In Emacs there are two essential commands when you have to go the beginning of a line - move-beginning-of-line (bound to C-a ) and back-to-indentation (bound to M-m ). The first takes you to the first column of a line and the latter takes you the first non-whitespace character on a line.
You can also move point using the arrow keys present on most keyboards: RIGHT, LEFT, DOWN, and UP; however, many Emacs users find that it is slower to use the arrow keys than the control keys, because you need to move your hand to the area of the keyboard where those keys are located.
The keybindings for movement by word in Emacs is almost the same as that of movement by character, but instead of the prefix C- it is M- . To move forward one word use M-f ; and to move backward one word use M-b . Movement by word will make up the bulk of your intra-line movement.
Typing C-l twice in a row ( C-l C-l ) scrolls the window so that point is on the topmost screen line. Typing a third C-l scrolls the window so that point is on the bottom-most screen line. Each successive C-l cycles through these three positions.
In Emacs the same thing is achieved by M-m (back-to-indentation).
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