


Mark a rectangular block of text using C-SPC from column 1 to the 4th column in line 3. You should see something like this.


Now, this is a rectangle of 4Cx3R. On this you can operate any rectangle commands. The first is obviously kill-rectangle, bound to C-x r k. Applying that on the above state of the buffer you should see the following.






The difference between kill-rectangle and delete-rectangle is that the former stores the killed text in kill rectangle ring while the latter doesn't.
Right, what happens if you don't want to shift the text to the left but just clear out a block of text? Well, that's when you use clear-rectangle bound to C-x r c.






Note how the entire block of text is shifted rightward without anything getting deleted. So, if you wanted to enter text in the space, toggle the Overwrite key(to prevent the existing text from moving further rightward), fill in the text and toggle the key back again.
But, you say, I don't want to enter the same text in the columns over and over again. In fact you just want some standard text to be plugged in. No worries, you have C-x r t STRING
Mark the rectangular region as shown,




Oops, you forgot to insert an x in front of all the lines starting with z's?






The most common uses of the rectangle commands are those that involve aligning columnar data, inserting and deleting columns of data, applying standard texts and the like.
Hopefully, this tutorial addresses the existence of rectangles in Emacs and how to use them. The Emacs manual has a little bit more on rectangles and how to use them with registers too. The canonical place to refer is the manual when things deviate from what I've mentioned above.