If I have text like this:
cat = "john"
leopard = "frank"
tiger = "josh"
and I want to select the first word of each line in block-wise visual mode, I want to be able to do something like this:
- put cursor before first word of first line
- hit
<C-v>
- hit
j
twice - hit
w
to move forward a word, selecting the first word of each line
However, this doesn't work, as vim doesn't allow each line's selection length to be of variable length. It ends up selecting an equal number of characters on each line, e.g. (removed unselected text for display purposes):
cat = "
leopard
tiger =
Is there a way to let <C-v>
select text in each line asynchronously by hitting w
or b
to select words on each line even if they aren't the same length?
If not, is there a way to create a macro for this?
:%s/.*=//
which is much faster than visual mode. Just depends on what you really want to do.:set virtualedit=all