Code Monkey home page Code Monkey logo

Comments (4)

occivink avatar occivink commented on June 30, 2024

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.

 avatar commented on June 30, 2024

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.

andreyorst avatar andreyorst commented on June 30, 2024

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.

occivink avatar occivink commented on June 30, 2024

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)

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.