Super User is a question and answer site for computer enthusiasts and power users. 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

In Textmate I can "Select Enclosing Brackets" with Command+Shift+B:


How can I set up a similar keyboard shortcut to select everything between the single / double quotes which encompass the cursor?

Desired Result:

Picture 1.png

share|improve this question
up vote 1 down vote accepted

In TextMate 2 you can use Ctrl+Option+B (Select Current Scope) to do this. Note this will include the quotes in the selection, which is slightly different from what you have pictured, but if what you want is to replace the contents you can just hit delete, one quote and then type.

Once you have the selection you can also use Ctrl-Shift-' to toggle the types of quotes surrounding the string, very handy.

I'm not sure if these are present in TextMate 1 as well.

share|improve this answer
thank you! although I loved textmate the stagnation in development caused me to move to Sublime Text :) – cwd Nov 8 '13 at 15:37
Understood - I was there with you but TextMate 2 is now being updated very regularly. May be worth another look. – Matt Sanders Nov 12 '13 at 19:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .