I created a little macro in TeXstudio for online math mode. I want to change the typical $$ for ${}$ and I did it:
When I execute the standard macro for online math I get $ | $ (the | represents the cursor), but when I execute my own macro I get ${}$|. Someone knows if there is a way for executing my own macro and obtain ${|}$?. Remember: | represents the cursor

${}$? – egreg Aug 05 '16 at 16:50$$and your equation is close to the end of the line, the equation will break in 2 lines. If you put your equation in the bracets${ equation }$, it won't break – Daniel Valencia C. Aug 05 '16 at 16:56${...}$spaces in the formula will not participate to stretching or shrinking in the line. – egreg Aug 05 '16 at 17:19