Kungsgeten / yankpad

Paste snippets from an org-mode file
MIT License
216 stars 18 forks source link

call specific yankpad entry via keybind? #28

Closed zeltak closed 6 years ago

zeltak commented 6 years ago

Hi!

was wondering if i could somehow bind a specific expansion from one of my yankpad subheaders to a key?

for example in emacs bind a key like f4 to insert/expand the *** file subheader?

* BibTeX-Mode
** fields
*** file
  File =         {$1},

thx alot again for this amazing tool which i have been using 100 times a day for the past 2 years :) :)

Z

Kungsgeten commented 6 years ago

You should be able to add a single-key tag to a snippet, for instance f and then use yankpad-map in order to insert snippets with keys. Let's say you bind yankpad-map to C-c y, you could then press C-c y f to insert that snippet.

zeltak commented 6 years ago

thx!

yeah i use that for some snippets currently but find that additional keys for direct snippet expansion would be more flexible and quicker :)

also can the single key be 2 keys like C-c y f f? otherwise it will quickly run out of characters :)

finally, one of the reasons i wanted to call a snippet directly (like calling a function) would be using it with hydras, which would be super useful to visually get hints on what snippets and keys are available to insert :)

thx alot again!

Z

Kungsgeten commented 6 years ago

You can now use yankpad-map-simulate for this.