Skip to content
Fix Code Error

How do I move to end of line in Vim?

March 13, 2021 by Code Error
Posted By: salt.racer

I know how to generally move around in command mode, specifically, jumping to lines, etc. But what is the command to jump to the end of the line that I am currently on?

Solution

Just the $ (dollar sign) key. You can use A to move to the end of the line and switch to editing mode (Append). To jump the last non-blank character, you can press g then _ keys.

The opposite of A is I (Insert mode at beginning of line), as an aside. Pressing just the ^ will place your cursor at the first non-white-space character of the line.

Answered By: dvorak

Related Articles

  • How do I include certain conditions in SQL Count
  • What is your most productive shortcut with Vim?
  • How to prevent scrolling the whole page?
  • How to spread a single column into wide format with 0 and 1…
  • Ukkonen's suffix tree algorithm in plain English
  • Assembly - JG/JNLE/JL/JNGE after CMP
  • How do I install a plugin for vim?
  • How can I hash a password in Java?
  • How to paste yanked text into the Vim command line
  • Bootstrap - center child when parent isn't centered or full…

Disclaimer: This content is shared under creative common license cc-by-sa 3.0. It is generated from StackExchange Website Network.

Post navigation

Previous Post:

Make the current Git branch a master branch

Next Post:

How to pop an alert message box using PHP?

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Get code errors & solutions at akashmittal.com
© 2022 Fix Code Error