Comments (3)
I don't think you can do better than your second attempt if you limit yourself to matching styles and style dispatchers. Those mechanisms only give you a single regexp per component of the input string and what you really want is to turn =
into two negative literals. There is however a different mechanism that allows you to produce as many components as you wish: the orderless-component-separator
.
So you can abandon your dispatchers and instead set orderless-component-separator
to a function that replaces an =
with as many negative literals as you need. Here's a simple example that only checks for =
at the beginning of the list of components, and relies on the default style dispatcher to kick in later and deal with the !
s:
(defun my-whacky-separator (string)
(let ((components (split-string string " +" t)))
(if (equal (car components) "=")
(cons '("!-tests.js" "!.spec.component.js")
(cdr components))
components)))
(setq orderless-component-separator #'my-whacky-separator)
Let me know if there's still any issue left to address with that solution.
from orderless.
Of course you could also store the text !-tests.js !spec.component.js
in a text register or bind =
to a keyboard macro that types that text for you.
from orderless.
A text register is just perfect. Thanks for the reminder :-).
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
- 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.