-1

Is it possible in visual-block-mode to use find next character?

Example:

1: select " in visual-block-mode:

code(|"|abcd").anotherCode()
code(|"|abcde").anotherCode()
code(|"|abcdef").anotherCode()
code(|"|abcdefg").anotherCode()

2.a: go to (find) next " symbol (or any other) and select this symbols:

code("abcd|"|).anotherCode()
code("abcde|"|).anotherCode()
code("abcdef|"|).anotherCode()
code("abcdefg|"|).anotherCode()

2.b: go to (find) next " symbol (or any other) and select all text inside this symbols:

code(|"abcd"|).anotherCode()
code(|"abcde"|).anotherCode()
code(|"abcdef"|).anotherCode()
code(|"abcdefg"|).anotherCode()
2

1 Answer 1

0

No, this is not possible. Visual-block mode only allows to select rectangular areas of text.

To achieve something similar to what you want, you may be interested in vim-multiple-cursors. With this plugin you can create multiple cursors, where the commands you supply will affect each cursor. Thus you could create multiple cursors for the first row of "s, then apply the desired editing command, such as df".

Not the answer you're looking for? Browse other questions tagged or ask your own question.