Skip to content

Instantly share code, notes, and snippets.

@lsparrish
Forked from crcx/REM.rst
Created December 20, 2009 19:08
Show Gist options
  • Save lsparrish/260603 to your computer and use it in GitHub Desktop.
Save lsparrish/260603 to your computer and use it in GitHub Desktop.

Retro Editor for Mortals

Author: Charles Childers
Version: 2009.12.20

REM User's Guide

Starting

Type the following and hit space or enter:

rem

Quitting

Hit the following key:

z

Navigation

Navigation is done purely with the keyboard.

Key Action
i Move cursor up one space
j Move cursor left one space
k Move cursor down one space
l Move cursor right one space
m Move cursor to middle of line
I Move cursor to top line
J Move cursor to start of line
K Move cursor to bottom line
L Move cursor to end of line
M Move cursor to center of line
n Switch to the next block
p Switch to the previous block

Entering Data

To switch to text entry mode, use the ESC key. You can then enter starting at the current cursor position. When you're done, hit ESC again.

X-Keys

The x-keys section is an example of an extension of rem. The behavior of ijkl keys is changed while in "x" mode.

Key Action
i Swap current line with top line
k Swap current line with the bottom line
j Shift line after cursor to the left
l Shift line after cursor to the right
x Exit from x mode

The X-Keys Loop

Pressing x begins a loop, which a given key can be configured to exit. i j k and l do not automatically exit, so they can be easily repeated. To finish using x-keys, you would simply press x again.

Swapping Lines

The i and k hotkeys both swap the current line for a different line. i swaps with the home line and k swaps with the end line. Using both of these you can conveniently swap the top line with the bottom line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment