Comments (4)
You could do something like this
(defun case-dispatcher (target _index _total)
(when (equal "&&" target)
(setq-local orderless-smart-case nil completion-ignore-case nil)
'(orderless-literal . "")))
(add-to-list 'orderless-style-dispatchers #'case-dispatcher)
Then, whenever you toss in a component that is &&
the matching turns case sensitive (even if you delete the &&
) for the rest of the current minibuffer session.
from orderless.
As a better alternative to your example above one can probably define a custom pattern compiler which either sets or unsets completion-ignore-case depending on the presence of &&, such that it won't affect the session forever?
from orderless.
Yes, one could. But you can also make that same style dispatcher turn off case sensistivity when given a single &
. That way to turn it off again you just delete a &
(or both).
from orderless.
It appears style dispatching is more flexible than I thought. This'll work fine for my needs. Thank you!
from orderless.
Related Issues (20)
- Possible conflict between orderless and AUCTeX HOT 28
- Orderless matches all TRAMP methods HOT 23
- Orderless with vertico cannot case-insensitively search files by default HOT 2
- Keybinding to switch between smart and strict case HOT 1
- GitHub-rendered readme is "Style dispatchers" section is misleading/hard to read HOT 3
- cannot rename with orderless HOT 1
- Warning: Value for ‘orderless-matching-styles’ does not match type hook HOT 2
- Quickly exclude several types of candidates HOT 3
- Case insensitivity not working for Upper case. HOT 2
- [FR] Add option for find-file to match only file name. HOT 7
- [Q] How do I use `orderless-style-dispatchers` with `ivy`? HOT 3
- Compatibility problem with lsp-bridge? (wrong-type-argument stringp (seq (group 100))) HOT 8
- Questions about annotation matching HOT 5
- New release 1.1? HOT 5
- consult-locate not supported Chinese Pinyin first letter search HOT 3
- Is it possible to include spaces in orderless-literal? HOT 2
- `orderless-not` ignores smart case
- High CPU usage on normal operations HOT 1
- Use & to match affixation prefix HOT 6
- How to set `orderless-affix-dispatch-alist` for a certain function? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orderless.