Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

This counts as something of a basic question, but one for which I cannot find an answer. I checked the documentation, I checked google, I searched it here, I read a bunch of different things, but nobody seems to have an answer.

Basically, I'm very lazy, and I rarely feel like dealing with wrapping things in brackets if it can be avoided. Things like '@' and '//' are very useful, but there are times when things just must be put in suitable brackets, which can get annoying when working around already written code. If only one could highlight the text and press a keyboard command and suddenly have that text wrapped in brackets...

But wait! In Basic Math Assistant there is a button that does exactly this! It's just quite cumbersome to use given that you need to have that assistant open and click on it, you might as well just do it by hand. Is there any way to get something like this to be done via a keyboard command or something similar?

share|improve this question
2  
As a start, here's some code to do it. Then you need to assign it to a shortcut. I haven't tried to get this working myself, but it's a good starting point. –  Szabolcs Oct 17 '13 at 0:39
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.