Closed kyhy closed 8 years ago
Right. It's intended as a tool to replaces instances of a word, and when you use it inside a visual selection you're replacing instances of the word within the selection.
This imposes some natural limitations. For example, you can't visually select lines 1 through 10 and then move the cursor up to line 5 in order to place the cursor on a word there (because that will change the visual selection to lines 1 through 5).
I'm going to close this for now, but let me know if you have any further questions.
I see, thank you for the explanation! For variables, I often use '-' to separate words, i.e. some-example-name
is there a way to define what a "word" is? or is it limited by how vim defines as a word object?
It is using <cword>
, but we could configure it to use <cWORD>
, I guess, or you could change what <cword>
targets by setting 'iskeyword'
. All of those are documented in the Vim help.
How are you suppose to use visual mode selection?
I tried visually selecting a few words then pressing default keybinding. However, it only selects the first word of the selection.