Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more expressiveness of narrow query #50

Open
t9md opened this issue Jan 23, 2017 · 1 comment
Open

more expressiveness of narrow query #50

t9md opened this issue Jan 23, 2017 · 1 comment

Comments

@t9md
Copy link
Owner

t9md commented Jan 23, 2017

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 t9md mentioned this issue Jan 25, 2017
2 tasks
t9md added a commit that referenced this issue Feb 28, 2017
to use select-files provider, `!md` to exclude markdown file can be
written as `md!`
@t9md t9md added the discussion label Mar 3, 2017
@t9md
Copy link
Owner Author

t9md commented Mar 9, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant