Quickstart

This guide helps you get started using aretext. It assumes you are comfortable using a terminal.

Introduction

Aretext is a terminal-based editor with vim-compatible key bindings. If you have used vim before, aretext should feel very familiar. If not, this guide will help you get started.

You may have heard that vim keybindings are difficult to learn. This is partly true. If you have used mainly GUI editors, it may take some time to feel comfortable. The benefit is that almost every code editor supports vim keybindings, so once you learn them you can use them everywhere: in an IDE, in a terminal, or ssh'd into a server thousands of miles away. This guide will help get you started!

Installing the editor

The first step is to install aretext. You can check whether aretext is installed by running:

aretext -version

If you see a version string like "1.2.3 @ 9955832c3e2036b762e59238fe39f648a3cb1199" then aretext is installed!

Starting the editor

To start the editor, run aretext. This will start a new, empty document called something like "untitled-1621605673.txt" (the number is a Unix timestamp).

Inserting text

To insert text, first press "i" to enter insert mode. You can tell you are in insert mode because the bottom of the screen will display:

-- INSERT --

While in insert mode, every character you type will be inserted in the document.

When you are done typing, press the escape key to return to normal mode.

In normal mode you can move the cursor using the "h", "j", "k", and "l" keys:

If you prefer, you can also use the arrow keys.

Saving and quitting

Return to normal mode by pressing the escape key. Then press ":" to open the command menu.

Type "s" to search for the "save" command. The first item should be "save". Press enter to save the document and return to normal mode.

In normal mode, type ":" to open the command menu again. This time, type "q" to search for the "quit" command. Press enter to quit the editor.

NOTE: if you are familiar with vim's "ex" mode commands, you can use these too! For example, "w" (write) always matches the save command, and "wq!" matches "force save document and quit".

Next steps

Congratulations! You can now edit a document in aretext!

The next sections explain how to use aretext effectively:

For an overview of all available commands, please see the Command Reference.