This question already has an answer here:
When you use some of the predefined shortcuts in texstudio on selected text, it wraps the text with the appropriate tags(is that the proper term?). For instance, suppose i highlight
Hello Worldand press Ctrl+i it becomes
That is pretty handy as you dont't have to move the end tags around. I was wondering whether there a way to program macro to have similar behavior too. Many thanks in advanced.
 found a similar answered question: Cross out the selected text using macro script in TexStudio