# How to select whole environment in 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, | (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

-
I have been using TeXstudio for a while now and I can say that it does not have this capability. Although it would be very helpful if TeXStudio (and TeXmaker) would have this capability. – hpesoj626 Oct 14 '12 at 15:11
Crosspost in the TeXstudio forum. – Qrrbrbirlbel Oct 14 '12 at 15:33
I posted it there. – Sigur Oct 14 '12 at 15:58
@Sigur Could you please follow up on Qrr..’s suggestion? – doncherry Apr 24 '13 at 4:49

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):

you can use Ctrl+Shift+P, I (for Parenthesis/Inner) to get

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

Also available is:

• Ctrl+Shift+P, J to jump to the corresponding begin/{ or end/},
• Ctrl+Shift+P, M to find a mismatching brace.
-
Thanks for attention. But when I press Ctrl+Shift+P,{O/J/M} nothing happens. But when I press Ctrl+Shift+P,I a new \item is inserted, at the cursor position, even outside the environment. The selection does not work here. I'm using TeXstudio 2.4 (SVN 3256:3257). – Sigur Oct 15 '12 at 12:50
@Sigur You must not press Ctrl+Shift when pressing the second key. – Qrrbrbirlbel Oct 15 '12 at 13:44

Problem solved!!

I found what is wrong with my TeXstudio. When I was pressing ctrl+shift+P I could see something blinking on the status bar. I noticed that this sequence of keys was setting the open file as master file.

So, I checked the shortcuts and I discovered the same shortcut used for two functions. After removing this, everything is working now!!

Thanks for attention and please close the topic. Regards.

-