vim-textobj-latex icon indicating copy to clipboard operation
vim-textobj-latex copied to clipboard

Add text object for paragraphs neighbouring environments

Open JohnReid opened this issue 6 years ago • 1 comments

Often I want to format a paragraph such as this one:

\begin{align}
...
\end{align}
This is
the paragraph
I wish
to format.....

So I added a text object so that I could do gwir to format it. I am quite new to vim scripting so I'm not sure that I've done everything the best way ;) Hopefully others might find it useful.

JohnReid avatar Nov 14 '18 10:11 JohnReid

TBH I'm sure this could be usefully generalised. For instance I often want to format items in lists:

\begin{itemize}
  \item I want to format this item separately from
  \item this item!
\end{itemize}

JohnReid avatar Nov 16 '18 09:11 JohnReid