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
\begincommand.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
iorI. First, with the cursor at the right, that is,\begin{equation}|(note the yellow color). Second, after Ctrl+Shift+P, note theequationin blue color. Then, I pressed only the keyi(I tried also onlyI).
- 4,161
- 37,330
-
1I 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
-
2Crosspost in the TeXstudio forum. – Qrrbrbirlbel Oct 14 '12 at 15:33
-
I posted it there. – Sigur Oct 14 '12 at 15:58
-
1We'd like to keep answers separate from questions, so you should write a separate answer instead of editing your answer into the question. Self-answers are perfectly admissible, and a well-written answer may earn you additional reputation. – Qrrbrbirlbel Oct 17 '12 at 04:38
-
@Sigur Could you please follow up on Qrr..’s suggestion? – doncherry Apr 24 '13 at 04:49
-
As the answer of you. I think you should update or reinstall texstudio. Then it will work. However, I think there should be some better answer. Any body? – Hamid Sep 17 '16 at 15:32
-
@Hamid, this question is very old. Now I'm using the latest version of txs. – Sigur Sep 17 '16 at 16:28
-
Does it work the same way? or you use another method? A better (shorter) shortcut may exist. Do you know any? – Hamid Sep 17 '16 at 19:40
2 Answers
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/{orend/}, - Ctrl+Shift+P, M to find a mismatching brace.
- 119,821
-
Thanks for attention. But when I press
Ctrl+Shift+P,{O/J/M}nothing happens. But when I pressCtrl+Shift+P,Ia new\itemis inserted, at the cursor position, even outside the environment. The selection does not work here. I'm usingTeXstudio 2.4 (SVN 3256:3257). – Sigur Oct 15 '12 at 12:50 -
1@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.
- 37,330
