In a mostly overlooked corner of my school lies an antiquated yet working Apple II, in full glory. I decided one day to login only to find some odd IDE running on the terminal - I soon found out it was an Emacs instance. I’d heard this name before. Where was it? Oh yea! In the Social Network!
Circa 6 months ago when I was about to make this switch, Atom was my IDE of choice. It was decent and it got the job done, so what else could I want? When I heard about Emacs, I did some research and found that there seemed to be a rivalry between Emacs power-users and the more mainstream Vim-ers.
In the spirit of teenage rebellion, I cast away Ol’ Reliable Atom and shunned the mainstream Vim in favor for Emacs, my new idol to learn and utilize completely. I used this textbook to pick up some commands as well as the official GNU Emacs manual and the uber-helpful Emacswiki. And so began my 3-stage journey of learning this command-line based editor completely from scratch.
The absolute first thing I had to learn with Emacs is how to move around. How do you move the cursor Forward? Backward? Up? Down? What the hell.
C-x f for forward?
C-x b for backward? It’s neat that the letters match up with the word, but how could anything possibly be more intuitive than the arrows? Or pointing and clicking?! This can’t disrupt my workflow: I haven’t even been able to start working because of how complicated this is!
Navigation in Emacs as newbie was probably the steepest part of the Emacs learning curve, so if anyone is out there learning or may have given up — keep practicing, it gets better I promise.
Just kidding, it gets even harder before it gets any easier. I learned about the all-important key-bindings, often by accidentally clicking some key while trying to navigate. Whoops, accidentally clicked
C-s — oh wait, what’s Iterative-Search? That’s kinda neat. I learned how to open and save files, how to switch buffers, and how to shut down Emacs (believe it or not it took me a while to figure this one out, I would just shut down my Terminal app)
I saw an instant jump in productivity when I discovered Eshell. (Check out this website for a general overview) Possessing a shell in an alternate buffer meant I could quickly hop around from working and writing code to testing it and modifying file structure. With a fully functional Shell at my side, I bypassed the tedious task of coding in an IDE, switching to my Terminal to run it, and switching back to modify code. When I became comfortable with Eshell, I began to notice that my productivity in Emacs was rising.
Emacs has some really cool features that boosted my productivity as well, so I’ll give them a special shoutout.
Macros allow you to chain a number of commands into one command. For example, if for a block of code you want to delete the first and last five characters of every other line, you can string together these commands and make it a macro, allowing you to complete such a task within a matter of seconds.
Emacs allows you to bind new commands to characters for the entire system. For example, I found this helpful Stackoverflow answer and followed the second answer to create a key binding that allows me to easily clear my Eshell screen! Key-Bindings are written in Emacs’ native language Lisp, so if you know the language you can create your own bindings to customize and improve your workflow!
Believe it or not, this feature took me some time to discover, but Emacs’ ability to split windows cleanly meant I could switch between and work on different files at a much faster pace than ever before. No longer was I stuck in the (now frustrating) process of switching tabs or windows. My workflow now looked something like this:
I’d still say I’m a novice when it comes to Emacs. There are some power-users out there that use Emacs’ immense capabilities to its fullest extent, and I’m nowhere close to them. That being said, I’ve been using Emacs for about a year now and I hope that my experience outlined here could prove valuable to anybody thinking about switching or learning this environment. I often find myself using Emacs navigation commands in Google Docs and Gmail and all sorts of places (amazingly, they work!) so it’s safe to say that I’m not leaving Emacs anytime soon.
I may have made some factual errors here and there, so please comment if you spotted something!
Know any other cool features that I didn’t mention? Please comment those too! Thanks!