Different behavior between g* and *
Allen Li
cyberdupo56 at gmail.com
Thu Feb 20 23:49:26 CET 2014
On Thu, Feb 20, 2014 at 09:51:48PM +0100, Frank Fischer wrote:
> Am 20.02.2014 12:03, schrieb Sanel Zukan:
> > Hi,
> >
> > I noticed there is difference between '*' and 'g*', especially when
> > modes are involved. For example, in c-mode when I hit '*' above some
> > variable like 'sample_variable', only 'sample' gets highlighted and
> > searched.
> >
> > However, with 'g*' 'sample_variable' is correctly highlighted.Similar
> > behavior is in lisp-like modes and cases like 'sample-variable'.
> >
> > Is this expected behavior? Just checked vim behavior, and in
> > both cases full variable name is highlighted and searched.
Here's the reference for g* in vim's builtin documentation for referene:
g* Like "*", but don't put "\<" and "\>" around the word.
This makes the search also find matches that are not a
whole word.
More information about the implementations-list
mailing list