TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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

I am looking for a way to select text inside surrounding nearest parenthesis. For example if I am working with a string

(text \textit{text2 $a^2=b$} text3)

this command selects whole string in case if my cursor is on text, textit or text3. In case my cursor is on tex2 it selects

{text2 $a^2=b$}

An if it is inside '$..$' it selects math expression. It would be very nice if i could interactively change the selection region from smaller to bigger and vice versa.

share|improve this question
up vote 3 down vote accepted

You could move the cursor to the opening bracket and then press C-M-SPC. Here's a similar question (with answers): http://stackoverflow.com/questions/5194417/how-to-mark-the-text-between-the-parentheses-in-emacs

There's also Emacswiki: http://www.emacswiki.org/emacs/NavigatingParentheses

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.