What is the appropriate way to make a pattern that matches up until the point where the move command e
would have moved to?
Consider this text: texttext%0s: cookie
after performing /%<CR>ve
the part %0s
would be selected, this is the part I want to replace with something else.
I tried :s/%.\{-}\>
which seems to match the right thing (as little as possible until end of word) but I'm not sure if it's 100% correct and how to interpret the manual:
:help \>
\> Matches the end of a word: The previous char is the last char of a
word. The 'iskeyword' option specifies what is a word character.
:help e
e Forward to the end of word [count] inclusive.
Does not stop in an empty line.
Is the only difference that e
moves past newlines?