feat(snip): expand into next line with correct indent (#13)

* New snippet type. Expand from nonempty line into next line.

* Fix trigger to ' dm' instead of 'dm'

* style: format code

* minor: improve regex

---------

Co-authored-by: arne314 <73391160+arne314@users.noreply.github.com>
This commit is contained in:
Eagle4398
2025-03-22 10:02:26 +01:00
committed by GitHub
parent ca3fcec66c
commit ec5caf32a8
2 changed files with 27 additions and 0 deletions

View File

@@ -43,6 +43,12 @@ end
return {
start('dm', '$\n<>\t<>\n<>$', { cap(1), visual(1), cap(1) }, markup),
helper.start_snip_in_newl(
'dm',
'$\n<>\t<>\n<>$',
{ helper.leading_white_spaces(1), visual(1), helper.leading_white_spaces(1) },
markup
),
start('fla', '#flashcard(0)[<>][\n<>\t<>\n<>]', { i(1, 'flashcard'), cap(1), visual(2), cap(1) }, markup),
start('flA', '#flashcard(0, "<>")[\n<>\t<>\n<>]', { i(1, 'flashcard'), cap(1), visual(2), cap(1) }, markup),
snip('IMP', '$==>>$ ', {}, markup),