NAME

oadledit - the default OADL editor

SYNOPSIS

oadledit [flags] [filenames]

The [flags] are zero or more of:

-nosyntax
Disable OADL syntax highlighting
-noindent
Disable auto-indent
-noexpand
Disable conversion of tabs to spaces
-tabstop n
Set the tabstop to n (default is 8)

The [filenames] is an optional list of UTF-8 input files. Although oadledit was customized for editing OADL programs, it may edit any UTF-8 text file.

DESCRIPTION

oadledit is a fork of Atto Emacs by Hugh Barney. It uses key bindings similar to the default Emacs key bindings.

Note in the key bindings below, "^X" means "<ctrl>"+"X" and "M-x" means "<esc>" then "x"

Cursor motion

Command Alternate Action
^A <home> begining-of-line
^E <end> end-of-line
^F <right> forward character (move right)
^B <left> backward character (move left)
^P <up> previous line (move up)
^N <down> next line (move down)
M-v <pgup> page up
^V <pgdn> page down
M-< M-<home> beginning of file
M-> M-<end> end of file
M-f M-<right> forward word
M-b M-<left> backward word
M-g goto typed-in line number

Text insertion

Command Alternate Action
^D <del> delete character under cursor
^H <backspace> delete character to left of cursor
M-i <ins> toggle overwrite mode
^I <tab> insert tab
^J ^M -or- <ret> insert newline

Copy/paste

Command Alternate Action
^K kill-to-eol (cut to buffer)
M-@ ^<space> set mark at current position.
^W M-k kill region (cut to buffer)
M-w copy region (copy to buffer)
^Y yank (paste)

Search/replace

Command Action
^R search-backwards
^S search-forwards
M-r Search and Replace

Note that the "Search and Replace" function is interactive. It prompts for a search string, prompts for a replacement string, and then, for every match, it asks the user whether to perform the replacement. The user may respond as follows:

Response Result
y Replaces the string and goes to the next match
n Ignores this match and goes to the next match
! Stops asking and replaces all subsequent matches
q Quits the search/replace process

Other commands

Command Action
^G abort (at search and file prompts)
^G Get help (other than at search and file prompts)
^L refresh display
^U undo
^X Control-X command prefix, see below
M-? Show version
M-a Toggle auto-indent
M-s Toggle syntax highlighting
M-x Toggle tab-to-space conversion
M-c Toggle case-sensitive matching (TBD)
M-n Toggle line numbering (TBD)
M-y Toggle mark buffer highlighting (TBD)

Control-X commands

Command Alternate Action
^X^C exit; any unsaved files will require confirmation.
^X^F find file; read into a new buffer created from a typed-in filename.
^X^S save current buffer to disk, using the buffer's filename as the name of the file
^X^W write current buffer to disk, using a typed-in filename
^Xi insert file at cursor potition
^X= show character at cursor position
^Xn ^X^N next-buffer; load current window with next buffer's contents
^Xk kill-buffer; close the current buffer
^X1 delete-other-windows - close all other windows
^X2 split-window; split the current window in half
^Xo other-window; go to the next window in sequence

Copying and moving text

A region is defined as the area between the mark and the current cursor position. The kill buffer is the text which has been most recently deleted or copied.

Generally, the procedure for copying or moving text is:

  1. Mark out a region using M-<space> at the beginning and move the cursor to the end of the region.
  2. Cut it (with ^W) or copy it (with M-w) into the kill buffer.
  3. Move the cursor to the desired location and yank it back (with ^Y).

Searching and replacing:

^S or ^R enters the search prompt, where you type the search string. <backspace> will reduce the search string, any other character will extend it. ^S at the search prompt will search forward. The search will wrap at end of the buffer. ^R at the search prompt will search backwards. The search will wrap at start of the buffer. <esc> will escape from the search prompt and return to the point of the match. ^G will abort the search and return to point before the search started

Multiple windows

oadledit supports multiple windows. The windows are views into any opened buffer; it is valid to have multiple windows opened into the same buffer.

Copyright notes

Atto code is released to the public domain. hughbarney AT gmail.com 2017. The oadledit changes by Ross Cunniff are MIT-licensed; see the OADL COPYRIGHT.TXT for more information.

Acknowledgements

References

  1. Perfect Emacs - https://github.com/hughbarney/pEmacs
  2. Anthony's Editor - https://github.com/hughbarney/Anthony-s-Editor
  3. MG - https://github.com/rzalamena/mg
  4. Jonathan Payne, Buffer-Gap: http://ned.rubyforge.org/doc/buffer-gap.txt
  5. Anthony Howe, http://ned.rubyforge.org/doc/editor-101.txt
  6. Anthony Howe, http://ned.rubyforge.org/doc/editor-102.txt

EXAMPLE

    bash $ oadledit foo.oad
    bash $ oadl
    OADL calculator. Type #help for help, #quit to quit.
        proc foo() { "Hello, foo!\n"; }
        #edit foo
        #quit

SEE ALSO

oadl
oadlcalc