user7673439
user7673439

Reputation:

How do I jump to the beginning of line in vim?

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?

Upvotes: 54

Views: 65984

Answers (5)

Liang Law
Liang Law

Reputation: 1

Shift + Home -> Beginning of the line
Shift + End -> End of the line

Upvotes: -1

jobukkit
jobukkit

Reputation: 2670

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.

Upvotes: 11

Aditya Dutta
Aditya Dutta

Reputation: 301

Assuming there is text in your file, while in normal mode:

  1. Press $(shift + 4) to go to end of a line
  2. Press ^(shift + 6) to go to beginning of a line

Upvotes: 28

Eliasz Łukasz
Eliasz Łukasz

Reputation: 548

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 ^.

Upvotes: 10

Sman25
Sman25

Reputation: 1795

Press 0 to go to the beginning of a line, or ^ to go to the first non-blank character in a line.

Upvotes: 91

Related Questions