2

I have a class for which I've written a custom environment. I'm trying to add this environment to the .cwl file, so that it would properly autocomplete.

Right now I have:

%.cwl
\begin{myenv}{command%text}
\end{myenv}

Which autocompletes as:

%.tex
\begin{myenv}{command}
    content...
\end{myenv}

What I want is:

%.tex
\begin{myenv}{command}
    \item
\end{myenv}

How can I achieve that?

Also, any pointers on where to find material on how to write cwl files (and how to distribute them with your class) would be appreciated. I'm finding TeXstudio documentation on them somewhat lacking.

2 Answers 2

2

Did you try this?

%.cwl
\begin{myenv}{command%text}\item
\end{myenv}

My you find also useful:

1
  • 1
    Didn't seem to do anything, but thanks for responding. I'll be sure to give it another stab when I have the time ... This problem got sidetracked since I posted it.
    – Loremaster
    Commented Nov 23, 2020 at 13:48
2

The following cwl code seems to work.

\begin{myenv}{command%text}%\\item %\\end{myenv}

Or this one for positionning cursor just after item.

\begin{myenv}{command%text}%\\item %<%>%\\end{myenv}
1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .