occivink / kakoune-snippets

Snippet support for kakoune
The Unlicense
48 stars 6 forks source link

[Feature request] Infinite expansion #42

Open augustebaum opened 3 years ago

augustebaum commented 3 years ago

Hi,

Even though it seems the development of this project has been 'abandoned' I was just wondering if a particular use-case could be dealt with by this kind of framework hypothetically -- for further reference, I suppose. I'm not aware that this is possible with other snippet managers but I very well could have missed it.

In LaTeX, bulleted and numbered lists are indicated by itemize or enumerate environments. In these, the bullets or numbers are denoted by \item. One of my snippets expands to

\begin{itemize}
  \item |
\end{itemize}

(the pipe is where my cursor ends up).

What I imagined was that pressing <Tab> could trigger a new \item statement to appear:

\begin{itemize}
  \item blah blah blah...
  \item |
\end{itemize}

and so on each time <Tab> is pressed in this environment.

I hope I was clear enough. Would this be feasible hypothetically or would we need something more powerful? Thanks.