learning emacs incrementally

I’m taking a Coursera course that encourages using emacs as an editor. I’ve been fluent in vi for over a decade so this seemed like a good time to try out emacs. You don’t actually need to use emacs for the class; it is just adding syntax highlighting. However, being minimally functional in emacs happened within two hours. And that was focusing on sml and not emacs. The idea is to become minimally functional quickly and then add “optimizations” to become faster.

Minimally functional commands:

Note that C means Control and M means meta (which is the escape key on the mac rather than alt – annoying because I can touch type alt but not escape)

  1. C-x, C-f – open a file
  2. C-x, C-s – save current file – I use this one a lot!
  3. C-x, C-c – quit emacs
  4. C-x 0 (that is a zero) – close the current split window and merge into one
  5. C-x o (that is a lower case o) – switch between split windows
  6. C-x 2 – split into two buffers – I actually stopped using this pretty quickly as I found it easier to have two tabs with emacs open.  I’ve seen multiple buffers used very effectively though.
  7. C-c, C-s – open sml RPEL – I stopped using this quickly as well
  8. Cx Cc – prompt to save and exit
  9. C-D – restart RPEL – stopped using as well
  10. M-p -previous RPEL – stopped using as well

Second iteration of using emacs better – navigating with the keyboard

  1. C-a – beginning of line
  2. C-e – end of line
  3. C-v – page down
  4. M-v page up – note must re-press escape each time
  5. C-s – regular expression search

Third iteration

  1. C-k – delete to end of line
  2. M < – beginning of file (yes that is escape + shift + , on a mac
  3. M > – end of file

And that’s as far as I got.  I was able to have “emacs” not get in my way with just this.  I can’t even call what I did learning emacs since I know there are many features that would make it more efficient.  But it was enough for the class.  And then I go back to vi.

3 thoughts on “learning emacs incrementally

  1. Hi Jeanne,
    thank you for sharing, I have learnt so much stuff with your blog and I still do !
    what was the name of the course ?

Leave a Reply

Your email address will not be published. Required fields are marked *