TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
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
We'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 4:38
@Sigur Could you please follow up on Qrr..’s suggestion? – doncherry Apr 24 '13 at 4:49
up vote 7 down vote accepted

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

    inner content

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.
share|improve this answer
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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.