I am using vim with latex-suite to edit my document and sometimes need to copy an entire environment (from \begin{...} to \end{...}). For example, I want to copy this part
\begin{align*}
\sigma &\rightarrow A | B | C | ABC \\
A &\rightarrow a | \varepsilon \\
B &\rightarrow b | \varepsilon \\
C &\rightarrow c | \varepsilon
\end{align*}
Whenever I need to do that, I have to move to the begin tags, count the number of line and enter the yank command (6yy in the case of the above example).
My question is:
I would advise you to use vim-textobj-latex plugin which gives you some new text object. Specifically the ae
and ie
text objects for "an environment" and "inner environment".
Note: vim-textobj-latex plugin relies on vim-textobj-user