Replies: 1 comment 3 replies
-
Hi, thanks for the kind words. I am not sure if I fully understood your question.
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Allow me to make my case or jump to TL;DR
I like to use tempel alongside abbrev as they each do their part in my "second brain"
my memory sometimes fails me, so having
tempel-insert
to minimize friction when this happens is nice, but usually I prefer to just type the template name and get moving asap. So, havingtempel-complete
as my capf is very convenient.corfu immediately shows me my options and, with my corfu configuration as below, I can "escape" the pop-up with minimum keystrokes.
(Note, using
tempel-expand
as the capf with this corfu config does not work. Pressing M-TAB uses an eglot completion -- this is probably a mistake in my configuration, but I wanted to mention it)The first problem with this set up is that tempel-complete is very eager and expands the first matched template immediately. Arguably, this isn't even a problem. Templates are few and usually fairly uniquely named. But I'm sure I could get it to wait for a word-separating character at least.
TL;DR:
Solving the second problem with this set up is currently beyond me. This problem is in the interaction between tempel and dabbrev (and others) when used through the
hippie-expand
function.For example, I am working in an elisp-mode buffer with tempel, and tempel-collection
I wish to autotype "logarithm"-- a long word I laboriously entered earlier -- using dabbrev.
So, I start to type "log" (in fact, I type "l" "o" C-g "g" to avoid issue 1) -- the name of the log message template. Then, I go to hippie-expand the rest with
M-/
If
tempel-expand
supported this paradigm and I prepended it to thehippie-expand-try-functions-list
, I would be able to expand the elisp log template with the first invocation, then simply pressM-/
again for the dabbrev completion, and as many times as needed again for more distant candidates. Unfortunately, this does not happen.Currently, you must try hippie-expand twice to get
tempel-expand
to work, and then the function looses track of "log" and denies that further expansions are possible.This is perhaps also an opportunity to get a
tempel-collapse
function that simply "un-expands" the log message form whenC-u M-/
is typed. This would allow for tempel to place nicely with the hippie-expand undo cannon, but might also be useful to other configurations. In my experience, standard undo backtracks to before the template name was entered.Thank you, minad and all your contributors very much for these powerful and elegant packages and for your consideration.
Cheers,
Panos
Beta Was this translation helpful? Give feedback.
All reactions