Monday, May 13, 2019

Re: searching one word containing # with touch *

On 2019-05-13, Mathieu Roux wrote:

> 2) when i go to :h g*, i can read:
>
>
> g* Like "*", but don't put "\<" and "\>" around
> the word.
> This makes the search also find matches that are not a
> whole word. {not in Vi}
>
> Really, i don't understand what it does. If i search "france", should
> it find also "fran"? I don't understand.

If you search "fran", it will also find "france" because "fran" is
a substring of "france". If, however, you search for "\<fran\>",
the \< forces the match to begin at the start of a word and the \>
forces the match to end and the end of a word, so that it will find
"fran" but not find "france".

See

:help /\<
:help 27.9 " and scroll down to FINDING AN IDENTIFIER

HTH,
Gary

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20190513182012.GB12153%40phoenix.
For more options, visit https://groups.google.com/d/optout.

No comments: