kakoune-snippets icon indicating copy to clipboard operation
kakoune-snippets copied to clipboard

Snippet always expand to the first entry

Open CharlesGueunet opened this issue 2 years ago • 1 comments

Using kakoune master, the expand of a snippet always trigger my first snippet.

more details

I have the following configuration for kakoune snippet:

  set-option -add global snippets_directories "%opt{plug_install_dir}/kakoune-snippet-collection/snippets"
  set-option global snippets_auto_expand true

  map global insert '<c-s>' '<a-;>: snippets-expand-trigger<ret><esc>'
  map global insert '<c-n>' '<a-;>: snippets-select-next-placeholders<ret><esc>'
  map global normal '<c-n>' ': snippets-select-next-placeholders<ret>'

I work only on CPP. Whenever a snippet is triggered, the result is:

#include <iostream>

even if I typed for, main, ...

I also tried to call the snippet-expand-selection manually with the same result.

Best, Charles

CharlesGueunet avatar Jul 12 '22 14:07 CharlesGueunet

Hi, that's probably due to one of the recent breaking changes. Most likely it's the <space> <-> , swap. I don't have time to work on it this week, but chances are you can just these two keys (in the context of an exec) and it will work.

occivink avatar Jul 12 '22 21:07 occivink