LinuxCommandLibrary

moe

Edit files

TLDR

Open moe and create a backup file (file~) when saving edits

$ moe [path/to/file]
copy

Open a file as read-only
$ moe [[-o|--read-only]] [path/to/file]
copy

Edit a file without creating backups
$ moe [[-B|--no-backup]] [path/to/file]
copy

Edit a file ignoring case in searches
$ moe [[-i|--ignore-case]] [path/to/file]
copy

Save and Quit
$ <Ctrl x>
copy

SYNOPSIS

moe [options] [file...]

PARAMETERS

-n, --no-hist
    Disables the use of a history file. No command history will be saved or loaded.

-w, --no-wrap
    Prevents automatic word wrapping in the editor window, displaying long lines as a single line.

-s, --no-smart
    Disables smart indentation, which automatically adds indentation based on context (e.g., after an opening brace).

-b, --backups
    Enables the creation of backup files (e.g., filename~). A backup of the original file is created before saving changes.

-c, --color
    Forces moe to use color output, even if it detects a monochrome terminal.

-m, --mono
    Forces moe to use monochrome (black and white) output, overriding any color detection.

-i, --ignore
    Instructs moe to ignore errors encountered while processing the history file.

-v, --version
    Displays the version information of the moe editor and then exits.

-h, --help
    Shows a summary of command-line options and keybindings, then exits.

DESCRIPTION

moe, standing for "My Own Editor," is a small, easy-to-use console-based text editor designed for quick and simple file editing. It aims to provide an intuitive user experience with CUA (Common User Access) style keybindings, making it accessible to users familiar with common GUI text editors. Built using the ncurses library, moe operates entirely within the terminal, offering features like syntax highlighting (if supported by terminal), word wrap, smart indent, and search/replace functionality. Its minimal design and small footprint make it an excellent choice for system administrators or users who need to perform quick edits on remote servers or low-resource environments without the overhead of more complex editors like Vim or Emacs.

CAVEATS

While moe is simple and easy to use, it lacks advanced features found in more comprehensive editors like macro recording, integrated shell commands, or extensive plugin support. Its CUA-style keybindings might feel unfamiliar to users accustomed to Vim or Emacs. For complex programming tasks or large projects, other editors may be more suitable.

KEYBINDINGS

moe largely follows CUA (Common User Access) keybindings, making it intuitive for users familiar with desktop text editors. Common operations include:
Ctrl+S: Save file
Ctrl+X: Exit editor
Ctrl+F: Find text
Ctrl+R: Replace text
Ctrl+A: Select all
Ctrl+C: Copy selected text
Ctrl+V: Paste text
Ctrl+Z: Undo
Ctrl+Y: Redo
A comprehensive list is usually available by pressing Ctrl+H or using the -h command-line option.

CONFIGURATION FILE

moe can be customized via a configuration file located at ~/.moerc. This file allows users to set default options, such as enabling word wrap, smart indent, or backup creation, removing the need to specify them on the command line every time.

HISTORY

moe was developed by Michael Gruenwald with the goal of creating a minimalistic, yet highly usable, text editor for the terminal. It emerged as an alternative to more complex and often resource-intensive editors, focusing on simplicity, speed, and adherence to Common User Access (CUA) keybindings. This design philosophy aimed to provide an intuitive experience for users transitioning from GUI environments or those who prefer a less steep learning curve compared to traditional Unix editors.

SEE ALSO

nano(1), vi(1), vim(1), emacs(1)

Copied to clipboard