[emacs] sorting lines

I will never stop saying how much I love emacs. I have to admit that it’s very difficult to learn how to use it and even after you have learned enough to use it, you will always find something that you didn’t know.

The task for today is simple: sorting the lines in a region. There’s an already existent macro: sort-lines. So first you will have to select the region and the call the macro. In the following example we will sort the lines of the whole document.

C-x h <RET> M-x sort-lines

Again: easy easy and easy 🙂


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s