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.
How can I enter visual mode *after* (or: to the right of) the cursor
vim
That behavior depends on the 'selection' option. You seem to have the (non-default) exclusive; with inclusive, the selection does include the character under the cursor. So toggling that option would be one solution.If you want to keep it, you could do your backwards selection, then use o$ or ol to go back to the right end and extend it by the missing character.Or, :set virtualedit=onemore. This will enable you to go beyond the last character in the line and start selecting from there: lv...Also, the available inner text objects often make the need of an explicit selection go away. For example, viw will select the entire last word.