I was looking at the documentation for search()
(:help search()
). I noticed that there is a "z" flag:
'z' start searching at the cursor column instead of zero
When the 'z' flag is not given, searching always starts in column zero and then matches before the cursor are skipped.
What does this mean exactly? I tried :call search('\S')
and :call search('\S', 'z')
, and both of them behave the same when in a file full of text.
What is the "z" flag used for? Could you provide a simple example demonstrating the use of the "z" flag?