Skip to content

Getting Started with Emacs

Installing Emacs

Since Ubuntu doesn't come with Emacs, I ran the following command to install it

console
sudo apt install emacs

This required me to select a Postfix server configuration, so I selected the "No Configuration" option.

Using Emacs

Throughout this project I've only been using Vim (although I tried using Nano once). Even using Vim, I am not advanced at all, the only thing that I know at this point is merely entering editing mode, exiting editing mode, and saving changes to a file.

Entering Emacs

To open a file with Emacs (not using the GUI version of Emacs), the following command can be ran

console
emacs -nw filename

The -nw flag means no-window, so it will not open the file in the Emacs GUI.

Making edits using Emacs

The first thing that I learned was how to make edits using Emacs. Unlike Vim, there isn't a special "editing" mode that needs to be entered, I can just start typing.

Exiting Emacs

Exiting Emacs can be done through the key combination Ctrl + X + C .

Copying, cutting, and pasting using Emacs

To copy a selection, use the combination Alt + W

To cut a selection, use the combination Ctrl + K

To paste, use the combination Ctrl + Y