Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insert \item in enumerate/itemize/description-Environment, even though cursor is in group of an item #3293

Closed
Lichtschalter-5000 opened this issue Oct 30, 2023 · 2 comments · Fixed by #3383
Labels
bug Deficiencies in TeXiFy behaviour.
Milestone

Comments

@Lichtschalter-5000
Copy link

Lichtschalter-5000 commented Oct 30, 2023

Type of JetBrains IDE (IntelliJ, PyCharm, etc.) and version

IntelliJ IDEA Ultimate 2023.2.4

Operating System

Win 10

TeXiFy IDEA version

TeXiFy IDEA 0.9.1

Minimal example to reproduce the problem

The environment could be itemize or description as well, probably even more list environments I don't know of.

\begin{enumerate}
    \item{Lorem ipsum**CURSOR HERE, PRESS ENTER**}
\end{enumerate}

Expected behavior

...
\item {Lorem ipsum
   **CURSOR NOW HERE**
    }

Actual behavior

...
\item {Lorem ipsum
\item **CURSOR NOW HERE** }

Fun fact: If I have an environment in the item group, the issue doesn't arise. But I think sometimes it still does or not with particular environments? Sometimes it doesn't happen, especially inside nested lists?

In case you can't imagine, this is heavily annoying if you work with list environments a lot (I do).

@Lichtschalter-5000 Lichtschalter-5000 added bug Deficiencies in TeXiFy behaviour. untriaged Issue type still needs to be triaged or verified. labels Oct 30, 2023
@Lichtschalter-5000 Lichtschalter-5000 changed the title Insert \item in enumerate/itemize/description-Environment, even though cursor is in group of an item Insert \item in enumerate/itemize/description-Environment, even though cursor is in group of an item - or not if outside Oct 31, 2023
@Lichtschalter-5000 Lichtschalter-5000 changed the title Insert \item in enumerate/itemize/description-Environment, even though cursor is in group of an item - or not if outside Insert \item in enumerate/itemize/description-Environment, even though cursor is in group of an item Oct 31, 2023
@Lichtschalter-5000
Copy link
Author

Lichtschalter-5000 commented Nov 3, 2023

Applies to this scenario as well:

\begin{description}
    \item Lorem ipsum **CURSOR HERE**dolor sit
\end{description}

I want to break the text onto two lines, because it's getting too long.
Expected behaviour:

\begin{itemize}
    \item {Lorem ipsum
        **CURSOR HERE**dolor sit}
\end{description}

Actual behaviour:

\begin{itemize}
    \item Lorem ipsum 
    \item **CURSOR HERE**dolor sit
\end{description}

@PHPirates
Copy link
Collaborator

Thank for reporting this! The first case is clearly a bug, it doesn't make sense to insert an \item if that means the result will be invalid.

However, in the second case it works as expected. If you don't want to insert an \item use Ctrl + Enter: https://hannah-sten.github.io/TeXiFy-IDEA/code-completion.html#inserting-item-in-itemize-environments

@PHPirates PHPirates removed the untriaged Issue type still needs to be triaged or verified. label Nov 7, 2023
@PHPirates PHPirates added this to the Next milestone Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Deficiencies in TeXiFy behaviour.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants