Take the 2-minute tour ×
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.

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
add comment

1 Answer 1

up vote 2 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
add comment

Your Answer

 
discard

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.