Sometimes, especially in math, you have to write expressions several times so you define a custom command like \newcommand{\thm}{\theta_{max}}. It would be very helpful to be able to select an expression and introduce a new custom command for this expression and all of its occurences. Later on it could also be helpful to be able to rename the custom command, applying the change to all of its uses.
Anonymous
Basically, you can already do this with find/replace (if necessary using regular expressions).