Your destination for complete Tech news

How to move to the end of the line in vim?

65 0
< 1 min read

To move the cursor to the end of the line in Vim, you can use the $ key. This key moves the cursor to the last character of the current line.

For example, if the cursor is currently at the beginning of a line, you can press $ to move the cursor to the end of the line.

You can also use the A key to move the cursor to the end of the line and enter insert mode. This allows you to add text to the end of the line without having to use the arrow keys to move the cursor.

If you want to move the cursor to the end of the line and then move to the next line, you can use the G key. This key moves the cursor to the last line of the document. You can also use a line number before the G key to move to a specific line, such as 5G to move to the fifth line of the document.

Finally, you can use the gg key to move the cursor to the first line of the document, and the <number>gg key to move to a specific line, such as 10gg to move to the tenth line of the document.

Leave A Reply

Your email address will not be published.

10 + 3 =

This site uses Akismet to reduce spam. Learn how your comment data is processed.