-
Notifications
You must be signed in to change notification settings - Fork 12
Query
t9md edited this page Mar 11, 2017
·
7 revisions
- Overview
- AND: chain word separated by
white-space - OR: chain word separated by
|. - Case sensitivity
- Wildcard by
* - Negate by
!starting or ending( optional ) query - Word-boundary by
>and<
- Used to filter items on
narrow-editor. - You can input query on first line of
narrow-editor. - Basically query is matched as-is
- No regular expression support currently.
- Meta character for regular expression is auto-excaped.
- Can chain multiple query separating by
whilte-space.- e.g.
foo barmeans, select items matchesfooandbar.
- e.g.
- See also Query expressiveness.
- General rule:
white-spaceis treated asAND,|is treated asOR, - Exception: First query on
narrow:scanis NOT evaluated as query as described in this page.- In
narrow:scan, when you inputaaa bbb cccin query area.-
aaais searched byeditor.scanas literally, out-of-scope of query expression. -
bbb cccis treated as query
-
- In
- Query:
aaa bbb cccmeans, "matches item which includeaaaANDbbbANDccc"(no order matter).
- Query:
aaa|bbbmatches items includeaaaORbbb. - Query:
a|b|c dmeans, matches items ((aORbORc) ANDd).- General rule:
|is treated asOR, white-space is always treated asAND.
- General rule:
- Limitation: You can NOT use
!( negate ) expression in each segment.-
!a|bis evaluated as!(a|b), means "matches items include neitheranorb." -
!a|!bis evaluated as!(a|!b),!in!bis not evaluated as negate( which is not what you expect ).
-
- Exception: When query starts or ends with
|char,|is NOT evaluated asOR.- e.g.
|,||,|a,a|,|a|b,a|b|,|a|b|, all searched as-is(literally),|is not evaluated asOR.
- e.g.
- Query case sensitivity is configurable with config
caseSensitivityForNarrowQuery.- Can override global setting on each provider if you want.
-
smartcaseis determined by each query.
-
*is treated as wildcard, internally converted to.*regular expression.- To search
*itself, use*solely separate it by space. - Or use double
**. ( e.g. To match to string*hellouse**helloas query).
- To search
-
!is treated as negate,!foomeans 'not matchingfoo'.- If config
negateNarrowQueryByEndingExclamationset totrue, you can also usefoo!.
- If config
- Query case sensitivity is configurable with config
caseSensitivityForNarrowQuery.- Can override global setting on each provider if you want.
- Prepend
>to match word-boundary(\b) at beginning of query - Append
<to match word-boundary(\b) at end of query -
\bboundary is NOT appended when\bis useless.(e.g.\b=match nothing) - Regardless of uselessness or not, beginning
>and ending<are initenally removed from query. - Translation example
-
>word<to\bword\b -
>wordto\bword -
word<toword\b -
>=to=( because\bis useless ) -
=<to=( because\bis useless ) -
>>=to>=( because\bis useless ) -
=<<to=<( because\bis useless )
-