1

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.

3

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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