Vim mode visual selection in word doesn't work #2847
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
One of the frequent things I do is type
viwto visually select inside a word. Basically it's the same as placing your cursor at the front of a word and typingvw, which does work. Butviwis nicer because, likeciw(which does work) it allows you to act on the whole word with your cursor anywhere in the word itself.The main use case I have for this is pasting something over a current word. If I want to change the name of a variable or something I frequently type it once and then do
yiwfor yank in word, then move to the replacement, typeviwand thenpto replace the visually selected word with the yank buffer contents.The reason this works well is because doing any sort of text deletion will modify the current yank contents. So if you yank something you want to paste somewhere else (like inside quotes or over a word) and you didn't yank it to a specific named buffer, you can't do another action that will modify that yank or you'll have a bad time trying to put it out. To get around this I like to do what I said and yank something, then visually select my put (paste) target, then put it right over it!
Here's a short screencast showing how this works in Vim http://quick.as/L6rI1G6
And for posterity, here's a much shorter, no sound, animated gif showing how I use this functionality.
Thanks!
mentioned in merge request !10006
FYI, register 0 contains the contents of the previous yank command.
mentioned in issue #33