Comments (4)
Allow me to point you to the FAQ.
I considered that triggers would generally be short so that they can be typed easily. What kind of triggers do you want to use?
from kakoune-snippets.
I completely missed out that section on the FAQ, sorry.
Personally, I like triggers a bit more verbose than small chain of letters meaning something.
A simple example should be function
instead of fun
or other similar stuff. I do use longer triggers but they are way too personal and I don't think they are a good example.
What I did for my use case is change the h6hs<ret>
for h<a-a><a-w>s<ret>
. That allows to check the full word instead of a pre defined length.
It works for me since I don't use spaces but I'm not really experienced with kakoune and I'm not sure if it might break something else.
from kakoune-snippets.
It works for me since I don't use spaces but I'm not really experienced with kakoune and I'm not sure if it might break something else.
I'm not sure if triggers should (or could) contain spaces
from kakoune-snippets.
I'm not sure if triggers should (or could) contain spaces
I used to think they should be restricted to alphanumeric, but then the topic of a /*
trigger came up and I've revised my stance to accept any trigger. Spaces should work, currently. Newlines too, if you're feeling particularly adventurous.
As you've observed, <a-a><a-w>
won't work if triggers contain spaces. The 6h
is kind of a compromise to work with any kind of triggers, with the annoying arbitrary max length.
Ideally we would do an arbitrary reverse search anchored to the current selection, but it's not possible to do efficiently in kakoune currently.
I'll raise it to 20 for now, surely that will be enough.
from kakoune-snippets.
Related Issues (20)
- [Feature Request] Display triggers in completion menu
- LSP completion snippets HOT 2
- Snippet load error HOT 2
- Show snippet expansion token, instead of snippet name HOT 2
- Replace first placeholder with selection HOT 6
- The plugin doesn't work in kak headless session mode HOT 2
- :snippets-info does not work for rust filetype HOT 1
- Integrate with completion menu HOT 1
- `(` in snippet file name cause error HOT 1
- Change insertion to start at first word boundary HOT 1
- Doc is not clear on how to expand snippet on keypress HOT 1
- Doc is not clear on how to define snippets other than in snippets-add-snippet HOT 2
- What is the state of the project ? HOT 2
- [Feature request] Infinite expansion
- [Feature Request] Discard default text if nothing is changed HOT 1
- snippets_auto_expand appears to do nothing HOT 3
- Expansions inside snippets HOT 4
- Snippet always expand to the first entry HOT 1
- Snippets broken on kakoune 2022.10.31 HOT 2
- Add configuration example HOT 7
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 kakoune-snippets.