# Is there any way (keyboard shortcut) to shift an enitre piece of text?

Okay I know I've worded the question horribly. We all know to make code visible in a box e.g:

\begin{document}

We have to shift it 4 spaces to the right so that it becomes:

\begin{document}


Is there any way to shift an entire group of text to the right instead of doing it line by line, like highlighting and then pressing the space bar, etc...

take a look at the line of icons above the answer box.

one of them is {} -- that indicates "code".

highlight the lines in your answer that you want presented as code, then click on the {}. done!

as noted by @JosephWright, Ctrl-K works as a shortcut after you've highlighted.

• You sir/madam are my hero, (where were you two years ago when I first joined), thank you. Aug 22 '17 at 13:43
• Perhaps add that the shortcut is Ctrl-K?
– Joseph Wright Mod
Aug 22 '17 at 13:52
• @JosephWright Does Ctrl-K exist? I wish I had known it before! It's extremely convenient! Aug 23 '17 at 12:16