1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
.TP
[default] word|wordpreference [\fIboolean\fP]
The selected file's
word-preference mode is turned on or off (default is off),
or reports the current setting if no argument is specified.
However, if\c
.Q default
is specified, the value to be inherited as the default by
subsequently-loaded files is set (or reported).
In word-preference mode, entries are searched for
.I "as if"
the search regex had a leading\&\&<\&\&and a trailing\&\&>\&\&,
resulting in a list of entries with a whole-word match of the regex.
However, if there are none, but there
.I are
non-word entries, the non-word entries are shown (the\c
.Q "saved list"
is used for this -- see that command). This make it an\&\&if there are whole
words like this, show me, otherwise show me whatever you've got\&\&mode.
If there are both word and non-word entries, the non-word entries are
remembered in the saved list (rather than any possible filtered entries
being remembered there).
One caveat: if a search matches a line in more than one place, and the
first is
.I not
a whole-word, while one of the others
.IR is ,
the line will be listed considered non-whole word. For example, the
search\&\&japan\&\&with word-preference mode on will not list an entry
such as\c
.Q "/Japanese/language in Japan/"
\&, as the first\c
.Q "Japan"
is part of\c
.Q "Japanese"
and not a whole word. If you really need just
whole-word entries, use the\&\&<\&\&and\&\&>\&\&yourself.
The mode may be temporarily toggled via the\c
.Q "!w!"
line prefix.
The rules defining what lines are filtered, remembered, discarded, and
shown for each permutation of search are rather complex, but the end
result is rather intuitive.
|