Given the following text:
Hello Part1/Part2 Bye
With the cursor on top of any character in
Part1/Part2 I would like to be able to refer to the whole
Part1/Part2 (for visual selection, deletion, substitution, etc.). For simplicity, let's talk about deletion.
/ a delimiting character, so it will consider
Part1/Part2 three different words:
Part2, and will delete only one of them (depending on where the cursor is).
I have also tried diSpace (since using di" will delete everything inside quotes, and di( will delete everything inside matching brackets, etc.), but it does not seem to work with arbitrary delimiters.
So two closely-related questions, the first one being a particular case of the second one:
- How can I quickly refer the word under the cursor (word in this context meaning "text delimited exclusively by blank spaces")?
- How can I quickly refer to the text between two arbitrary delimiters?
I am aware of the answer to a similar question, but I'd like to keep the solution in line with the di" style (i.e. not visually selecting the text and then performing an operation; but instead first defining the operation and then specifying the text in which it needs to be performed). If no default command will cut it, I'd be happy with something I can map to a customized key binding.