How To Install elpa-olivetti on Ubuntu 18.04

In this tutorial we learn how to install elpa-olivetti on Ubuntu 18.04. elpa-olivetti is Emacs minor mode to more comfortably write prose

Introduction

In this tutorial we learn how to install elpa-olivetti on Ubuntu 18.04.

What is elpa-olivetti

elpa-olivetti is:

Olivetti keeps everything it does buffer-local, so you can write prose in one buffer and code in another, side-by-side in the same frame. Or, by hiding the mode-line and using a single window in a fullscreen frame, Olivetti provides a nice distraction-free environment. In this sense it is similar to writeroom-mode, but the latter is a more hardcore distraction-free writing mode with much larger scope.

Features:

  • Set a desired text body width to automatically resize window margins to keep the text comfortably in the middle of the window.
  • Text body width can be the number of characters (an integer) or a fraction of the window width (a float between 0.0 and 1.0).
  • Interactively change body width with: olivetti-shrink C-c [ [ [ … olivetti-expand C-c ] ] ] … olivetti-set-width C-c \
  • If olivetti-body-width is an integer, the text body width will scale with use of text-scale-mode, whereas if a fraction (float) then the text body width will remain at that fraction.
  • Optionally remember the state of visual-line-mode on entry and recall its state on exit.
  • Optionally hide the mode-line for distraction-free writing.

There are three methods to install elpa-olivetti on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install elpa-olivetti Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install elpa-olivetti using apt-get by running the following command:

sudo apt-get -y install elpa-olivetti

Install elpa-olivetti Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install elpa-olivetti using apt by running the following command:

sudo apt -y install elpa-olivetti

Install elpa-olivetti Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install elpa-olivetti using aptitude by running the following command:

sudo aptitude -y install elpa-olivetti

How To Uninstall elpa-olivetti on Ubuntu 18.04

To uninstall only the elpa-olivetti package we can use the following command:

sudo apt-get remove elpa-olivetti

Uninstall elpa-olivetti And Its Dependencies

To uninstall elpa-olivetti and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove elpa-olivetti

Remove elpa-olivetti Configurations and Data

To remove elpa-olivetti configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge elpa-olivetti

Remove elpa-olivetti configuration, data, and all of its dependencies

We can use the following command to remove elpa-olivetti configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge elpa-olivetti

References

Summary

In this tutorial we learn how to install elpa-olivetti package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.