Crating text by typing is the major part of a developers life, even every professional working in intelligent based domain have to produce a hefty amount of text. Since most of our day is covered in writing text, it is better to have a good text editor in handy. I am using Visual Studio Code as my Default editor for development and most of us falls in this category. But I would love the idea of using a Text Editor for programming or even email typing where I don’t have to lift a finger, at-least without lifting a finger for reaching a mouse.
As I have often used vi for small config edits in the RHEL server for deployment I am familiar wi th few basic commands and loved❤️🔥 the idea where we can modify programs in a terminal, when explored further I have landed on two major players in terminal text editing either vim or emacs. Both has its advantages and I have decided to learn emacs by flipping a coin🪙.(literally).
As I have finished the initial tutorial and started going through the manual, I getting close comfortable. As a result I am trying here to explain the best approach for approaching Emacs as a beginner with my first hand experience. First of let me be clear about following points:
- Do you need learn vim/Emacs to be a programmer? – Hell! No, I have survived so far without it, and build a nice carrier on GIS. Some of my great mentors use Visual Studio(not VS code) as their only IDE throughout their life.
- Then why? – It’s FUN. Isn’t that the first reason we become a programmer?
- It’s free – Quoting immortal words of Richard Stallman “Free as in Freedom, not in Free beer”. Also it is costing nothing, apart from good amount of time to learn
- Saves Time – It is definitely a time saver, not because you can type without reaching for mouse, But it is less distractive and helps you focus only on your code or the content you are writing
So that said, what’s I think as the recommended approach for a beginner is:
1. Use the vanilla GNU Emacs
There are few very good variants of Emacs like Doom Emacs or Space Emacs, but stick to the GNU emacs as beginner as it will let us learn from the scratch
2. Finish the Emacs tutorial
By Default Emacs opens with the below screen,
The Emacs Tutorial is the best place to start your journey. Before going to see any youtube videos this is a best place just sit through it for couple of hours it’ll help a lot when going through the manual in future as you’ll also get familiar with the emacs terms. Also all the basic keys that you need for handling Emacs is explained in the tutorial page.
2. Use the Emacs GUI client
Even though Emacs can run very similar to GUI in terminal, it is best to use the GUI client as it is having support for fonts and images. Also the frames (i.e windows in Emacs world) can be maintained fine in a GUI environment
3. Don’t try to memorize shortcuts
M-x ( + x) is the command option which has all the commands including the onces that you’re going to use as shortcuts. So don’t worry a lot about memorizing the shortcuts, even if you forgot something you can get it, by typing M-x and get the list of all available commands, see below image.
4. Try to stick with manual
There are lot of youtube tutorials and books and blogs on Emacs but better stick to the manual for the first month. The GNU Emacs manual is a meticulously documented one and all other tutorials are based on it. It is better to follow it till you’re comfortable roaming around Emacs
5. Don’t run behind shiny things
There are lot of shiny things on emacs like packages, org mode, web browser, email client etc., but stick to the basic that is text editing till you get comfortable to navigate and create your document on the Emacs
6. Wallpaper the Emacs Reference Sheet
The Emacs Reference sheet is two pages you can make it as the wallpaper on dual monitor screen or print it on a A3 sheet and actually stick it on the wall. It can help you remember the important shortcuts.
7. Use Dark Mode
VS Code is the culprit and I am very much used to dark mode, you can change the default foreground and background color using below commands and enjoy dark theme momentarily.
M-X set-background-color <RETURN>
gra14 #color of my choice
M-X set-foreground-color <RETURN>
white #or any other light color of your liking
All the best and enjoy Touch Typing at it’s best using Emacs. Below is my basic shortcuts explained in my own words please refer it.