atom-narrow icon indicating copy to clipboard operation
atom-narrow copied to clipboard

more expressiveness of narrow query

Open t9md opened this issue 8 years ago • 1 comments

For more powerful way to narrow items on the list. This is for how query keyword is treated in narrowEditor.

  • Settled: Keyword is separated by #white-space.
    • Type of query(regex/simple-keyword) has to be treated per query-word.
  • Settled: simple-keyword: Internally filtered by _.escapeRegExp
    • When no special prefix is used as query.
    • Case sensitivity(sensitive/insensitive/smartcase) is handled per query-word.
    • What if I want to search space itself or space contained keyword as simple-keyword?
      • No I can't, but maybe it's OK. Use regex \s.
    • Wild card helper support?
      • When I want to search keyword starting pre- keyword.
      • I can use * as wildcard.
      • e.g. pre-* matches pre-a, pre-abc etc..
      • e.g. pre-*llo*suffix matches pre-hello-worldsuffix etc.
      • Single * matches non-whitespace char(>1 length). abc*e not matches abe.
      • What if I want to search * itself? Doesn't * helper disturbing?
        • Double **.
  • Idea: negate-simple-keyword
  • Idea: regex: by prefixing query with /, e.g. /abc\w+
    • When I want to search / char as simple-keyword, doubling /
      • So searching /etc/hosts as simple-keyword would be //etc/hosts(yes second / is not necessary).
  • Idea: negate-regex: by prefixing query with !/. e.g. !/abc\w+
    • When I want to search !/ char as simple-keyword, doubling //
      • So searching !/etc/hosts as simple-keyword would be !//etc/hosts(yes second / is not necessary).
  • Idea: Provide short cut to replace type of keywods?
    • narrow-ui:toggle-negate-query add/remove ! prefix of current-word.
    • narrow-ui:toggle-regex-query add/remove / prefix of current-word.
  • Idea: Syntax highlight(by grammar) to help understand meta char or regex/not-regex status by eye.
    • e.g. Single * is highlighted, but ** is not highlighted.

t9md avatar Jan 23 '17 03:01 t9md

See https://github.com/t9md/atom-narrow/wiki/Query for currently implemented.

t9md avatar Mar 09 '17 07:03 t9md