jeudi 15 janvier 2015

How can I enter visual mode *after* (or: to the right of) the cursor


Let's say I am typing something, then realize that what I just typed will be repeated a couple of times.


Now, what I would like to do is to select backwards, yank (thereby returning to the position I started from), and immediately paste. However, when my last typed character is also the end of the line, I cannot move the cursor one space over, and going into visual mode starts the selection to the left of the cursor, which means that the last character I typed (usually a brace), will not get copied along with it.


In spite of a long and fruitless search, I cannot come up with any way to start selecting after the cursor instead of in front of it.


In Vim, after all, you have "i" to start inserting before, and "a" to start inserting after the cursor. So if "v" is the equivalent of "i", where is the equivalent of "a" to start selecting after the current character? No cheat sheets or tutorials I looked at had an answer.



Aucun commentaire:

Enregistrer un commentaire