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

Feature request: Splitting LaTeX commands onto newlines #196

Open
lukelbd opened this issue Oct 24, 2022 · 1 comment
Open

Feature request: Splitting LaTeX commands onto newlines #196

lukelbd opened this issue Oct 24, 2022 · 1 comment

Comments

@lukelbd
Copy link

lukelbd commented Oct 24, 2022

I see that splitjon can already split between single-line and multi-line LaTeX environments as follows:

\begin{itemize} \item Hello \item Goodbye \end{itemize}
\begin{itemize}
  \item Hello
  \item Goodbye
\end{itemize}

I would find it useful if splitjoin also worked with commands. For example:

\abstract{Words words words foo bar baz.}
\abstract{%
  Words words words foo bar baz.
}

Maybe I'll give this a shot myself in a week or so.

@AndrewRadev
Copy link
Owner

It should be relatively straightforward, but I don't use LaTeX myself, so I'd need some details on what would be correct. I created the branch latex-commands as a starting point: main...latex-commands

Indentation seems a bit weird for the }, but that comes from Vim itself. Let me know what you think and feel free to take that branch as a starting point to experiment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants