Reputation: 3121
I am trying to get off of using the arrow keys to navigate in VIM, so that I dont have to move my hands off the home rows. The problem I am having is finding the End Key equivalent. I used it a ton to go to the end of a line. I can still use it, but then I have to move my hands off the home rows, making this adjustment pointless. $ moves my cursor to the last character in the line, not after the last character in the line, which is where I want it to go. Why would I want to insert right before the last character on the line?
How can I remap the functionality of End Key (which can be used in insert and visual mode) to something else?
Thank you
Upvotes: 0
Views: 367
Reputation: 196789
It looks like you are doing $i
which is the wrong approach.
$
is the right command to reach the end of the line but i
is used to enter insert mode before the current character. You are supposed to use a
to enter insert mode after the current character.
So you seem to be blocked because you don't know about a
which is just as basic as i
, IMO.
$a
would solve your immediate problem.
But there's more, did you know that you can use I
to enter insert mode at the beginning of the line? What command could we use to enter insert mode at the end of the line?
You are right, the correct command to enter insert mode at the end of the line is simply A
, as @dusan commented.
You don't need to remap anything. What you need is a second (first?) injection of $ vimtutor
.
Upvotes: 4