Giter Site home page Giter Site logo

Comments (6)

minad avatar minad commented on August 19, 2024 1

Just stumbled over this: https://github.com/doyensec/regexploit 😆

from orderless.

oantolin avatar oantolin commented on August 19, 2024

One good test to try would be to test (setq completion-style '(orderless) orderless-matching-styles '(orderless-flex)) vs (setq completion-styles '(flex)). If, as I suspect, they are comparably slow, it would be an indication that there isn't much to be done about this.

I wasn't fully aware of my motivation at the time, but in my personal configuration the expensive styles like initialism and flex are always introduced by explicit syntax. It must have been that I felt those were slower (but I never deal with long lines, so the difference is pretty small).

from orderless.

minad avatar minad commented on August 19, 2024

I am not using flex by default since it seems so much more expensive. It always leads to a noticeable slowdown. But initialism is activated always. I am using the default settings with the explicit syntax for flex~ and literal= and !negated literal.

from orderless.

oantolin avatar oantolin commented on August 19, 2024

My syntax for flex even has two characters! Again, probably subconsciously I felt it was even slower than initialism. I use a single (either leading or trailing) . for initialisms but curly braces for flex (I also use electric-pair-mode so I only type one brace).

from orderless.

minad avatar minad commented on August 19, 2024

It is not unreasonable to use multiple characters for the explicit styles in order to avoid interference with regexps. And usually when I do an explicit style switching, typing two letters wouldn't make a difference.

from orderless.

minad avatar minad commented on August 19, 2024

What about removing initialism from orderless by default? Instead recommend creating special orderless-styles which include more matching styles? And in any case we have the matching style dispatchers.

(orderless-define-completion-style orderless+initialism
  (orderless-matching-styles '(orderless-initialism orderless-literal orderless-regexp)))

(setq orderless-matching-styles '(orderless-literal orderless-regexp))

(setq completion-category-overrides
      '((file (styles partial-completion orderless+initialism))
        (command (styles orderless+initialism))
        (buffer (styles orderless+initialism))
        (consult-multi (styles orderless+initialism))
        (symbol (styles orderless+initialism))))

from orderless.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.