Emacs! A Cheat-Sheet!
Note:- This article is heavily borrowed from
The editor is always the ally and if it’s Emacs it will be the closet ally. I will try to write down all the Emac’s possible commands I know.
This is more of a revision place for me.
Emacs installation is pretty straightforward. Follow the below link to install Emacs.
GNU Emacs download — GNU Project
To improve the use of proprietary systems is a misguided goal. Our aim, rather, is to eliminate them. We include…
Once the installation is done you should be able to see something like the below.
All credit goes to Richard Stallman! Thank You!
Editing in Emacs takes place in a buffer, any file that you open is held by the buffer.
Scratch is the default Emacs buffer.
- In Emacs, editing takes place in buffers.
- To switch to a buffer, use C-x b and enter the buffer name in the minibuffer.
- To create a new buffer, use C-x b and enter a new buffer name.
- To open a file, use C-x C-f and navigate to the file.
- To save a buffer to a file, use C-x C-s.
- To create a new file, use C-x C-f and enter the new file’s path. When you save the buffer, Emacs will create the file on the file system.
How to create Buffer?
- Press Control and X buttons together
- Release Control
- Press B
Some of the very important Key Bindings in Emacs
Note:- C is Control Key and M is Meta Key on your keyboard
C-a Move to begin of line.
M-m Move to the first non-whitespace character on the line.
C-e Move to the end of the line.
C-f Move forward one character.
C-b Move backward one character.
M-f Move forward one word.
M-b Move backward one word.
C-s Regex searches for text in the current buffer and moves to it.
Press C-s again to move to the next match.
C-r Same as C-s, but search in reverse.
M-< Move to the beginning of the buffer.
M-> Move to the end of the buffer.
M-g g Go to line.
Keybindings for Kill Ring
C-w Kill region.
M-w Copy region to kill ring.
M-y Cycle through kill-ring after yanking.
M-d Kill word.
C-k kill line.
This article is still a Work In Progress and I keep updating it.