How do I go to the beginning of the line in vim editor in normal mode?
Is it possible to using my Home key on keyboard on Linux?
How do I go to the beginning of the line in vim editor in normal mode?
Is it possible to using my Home key on keyboard on Linux?
Press 0 to go to the beginning of a line, or ^ to go to the first non-blank character in a line.
Assuming there is text in your file, while in normal mode:
$
(shift + 4) to go to end of a line^
(shift + 6) to go to beginning of a line^
to go to the beginning of the line. The question doesn't ask about going to the end of the line. Please read How to Answer. –
Pyroxene Add this line to .vimrc
map <Home> 0
this maping or change key Home to 0
Jump to begining of actual line 0
Jumping to first characten but not white space in actual line ^.
The other answers already say that you can move to the beginning of the line with 0 or ^.
However they do not mention that you can instead use capital I to directly enter INSERT mode at the beginning of the line, so you don't have to press 0 and then lowercase i seperately. The end-of-line equivalent is capital A.
Shift + Home -> Beginning of the line
Shift + End -> End of the line
© 2022 - 2024 — McMap. All rights reserved.