How to copy/yank only the current word which has only alphanumeric characters in Vim How to copy/yank only the current word which has only alphanumeric characters in Vim unix unix

How to copy/yank only the current word which has only alphanumeric characters in Vim


yiw

does what you seem to want with the sample provided. It's a very basic command.


Would yanking up to the next word boundary with yW (capital W) do what you want?You can paste the yanked word with p. I believe it doesn't get much shorter than that (other than mapping keystrokes).