[Tex/LaTex] How to select whole environment in TeXstudio

texstudio

When I was a Windows user (a long time ago), I remember that it was
possible to select the whole environment in WinEdt just by double
clicking the \begin command.

Is it possible to do this in TeXstudio? How do we select an
environment?


Edit I tried the suggestions below with no progress. I am posting an image showing what happens when I press the shortcut Ctrl+Shift+P
and (after released the 3 keys) I pressed the key i or I.
First, with the cursor at the right, that is, \begin{equation}|
(note the yellow color). Second, after Ctrl+Shift+P, note the
equation in blue color. Then, I pressed only the key i (I tried
also only I).

enter image description here

Best Answer

As benibela from the TeXstudio development group answered:

The cursor has to be placed directly at the border of the parenthesis/environment. I.e. if | marks the cursor, it has to be either there: |\begin{example} or there: \begin{example}| (where it is highlighted)

So, if you have the following code snippet

\begin{itemize}
  \begin{enumerate}
    inner content
  \end{enumerate}
\end{itemize}

and place the cursor like this (notice the yellow highlighting):
cursor before \begin
you can use Ctrl+Shift+P, I (for Parenthesis/Inner) to get

inner selection
or Ctrl+Shift+P, O (for Parenthesis/Outer) to get

enter image description here


Also available is:

  • Ctrl+Shift+P, J to jump to the corresponding begin/{ or end/},
  • Ctrl+Shift+P, M to find a mismatching brace.
Related Question