Skip to content
Advertisement

Move to the end or beginning of the current line in VI when in insert mode

I am not proficient with my knowledge of VI editor and find it troublesome to keep pressing the -> (Right Arrow) key to move to the end of the line

While searching on google I found that exiting the insert mode and then pressing the $ key will move the cursor to the end of the line. It works fine, but I will still want to be able to move the cursor to the end of the current line or the beginning while in insert mode.

Any help with it is appreciated.

Thanks in advance

Advertisement

Answer

The solution is quite simple

End will force the cursor to the end of the line and Home will force the cursor to beginning of the line in Linux VI editor

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement