Sunday 21 October 2018

linux - How to set cursor to after last character in vim?


Why can't I insert at the end of a line in vim if there's no whitespace at the end? Let's take for example my SSH config file:


enter image description here


I try to use $, l, e, but I can't seem to get to the end of the word. When I start typing in insert mode, I get the following:


enter image description here


What gives? How do I make sure I can insert at the very end of a line?



Answer



What you want is to use is the a command instead of the i command to enter insert mode. Or if you want to jump to the end of the line and start insert mode, use A. Note that I will jump to the beginning of the line and enter insert mode.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...