\input texinfo   @c -*-texinfo-*-
@setfilename zile.info
@settitle The Zile Manual

@dircategory Text editors
@direntry
* Zile: (zile).                 A very small Emacs-subset editor.
@end direntry

@c If "finalout" is commented out, the printed output will show
@c black boxes that mark lines that are too long.  Thus, it is
@c unwise to comment it out when running a master in case there are
@c overfulls which are deemed okay.

@iftex
@c @finalout
@end iftex

@setchapternewpage odd

@titlepage
@title The Zile Manual
@subtitle for Zile version 2.2
@subtitle February 2008
@author Sandro Sigala and Reuben Thomas

@page
@vskip 0pt plus 1filll
Copyright @copyright{} 1997-2004 Sandro Sigala

Copyright @copyright{} 2003-2008 Reuben Thomas

Copyright @copyright{} 2004 David A. Capello
@end titlepage

@c ---------------------------------------------------------------------------
@node Top, Overview, (dir), (dir)

This is the @emph{Zile} manual.

Zile is small Emacs clone.
Zile is a customizable, self-documenting real-time display editor.
Zile was written to be as similar as possible to Emacs; every Emacs
user should feel at home with Zile.

@menu
* Overview::                    An overview of the Zile editor.
* Features::                    The characteristics of Zile.
* Invoking Zile::               Command line options that you can give to Zile.
* Initialization file::         The ``.zile'' initialization file.
* Getting help::                How to get help in Zile.
* Key names::                   How the keys are named.
* Functions::                   The list of functions.
* Variables::                   The list of variables.
* Bug reports::                 How to report a bug.
@end menu

@c ---------------------------------------------------------------------------
@node Overview, Features, Top, Top
@chapter Overview

The Zile editor is written entirely in @emph{@w{ANSI C}}.
It should run on any POSIX system.

Zile should really appear like Emacs, but a lot of good ideas were
also taken from other editors; in particular, ce for the internal
structure.

@c ---------------------------------------------------------------------------
@node Features, Invoking Zile, Overview, Top
@chapter Features

@itemize -
@item Small but fast and powerful.
It is useful for small footprint installations (e.g. on floppy disk) and
small computers.
@item 8-bit clean.
Zile can operate with binary files.
@item Looks like @emph{Emacs}.
Key sequences and function names are identical to Emacs.
@item Multi buffer editing with multi level undo.
Zile can open as many files and restore as many undo operations as
memory allows.
@item Multi window.
Zile can display multiple windows on the screen.
@item Killing, yanking and registers.
The killing, yanking and register features of Emacs are available
in Zile.
@item Minibuffer completion.
This works for @kbd{M-x} commands, file, buffer and variable names.
@item Auto fill (word wrap).
Zile automatically breaks the lines when they become too wide (if
@i{Auto Fill Mode} is enabled).
@item Auto line ending detection.
When a file is loaded, its line ending is detected automatically as
either LF, CR or CRLF.  Files with mixed line endings will be displayed
as if they had LF line endings.  If a CR line ending is detected,
``(Mac)'' is shown in the modeline, and for CRLF, ``(DOS)''.
@end itemize

@c ---------------------------------------------------------------------------
@node Invoking Zile, Initialization file, Features, Top
@chapter Invoking Zile

The options are as follows:

@table @samp
@item FILE
Edit file @file{FILE}.
@item +NUMBER
Go to line @samp{NUMBER} in the next file opened.
@item --batch
Do not do interactive display; implies @samp{-q}.
@item --help
Display a help message and exit.
@item -f, --funcall FUNC
Call Zile function @samp{FUNC} with no arguments.
@item --no-init-file, -q
Do not load an init file.
@item --version
Display version information and exit.
@end table

Zile returns 0 on successful termination, 1 if it cannot start up, for
example because of an invalid command-line argument, and 2 if it
crashes or runs out of memory.

@c ---------------------------------------------------------------------------
@node Initialization file, Getting help, Invoking Zile, Top
@chapter Initialization file

When Zile is started, it normally loads the @file{.zile} file in your
home directory.  We call this file your ``initialization file'' because
it specifies how to initialize Zile for you.  You can use the command
line switch @samp{-q} to tell Zile not to load the initialization file.

@menu
* File syntax::                 The initialization file syntax.
* Sample file::                 A sample initialization file.
@end menu

@c ---------------------------------------------------------------------------
@node File syntax, Sample file, Initialization file, Initialization file
@section File syntax

The initialization file is written in Zile Lisp.  Zile Lisp is a tiny
subset of Emacs Lisp that consists of the Zile commands plus
@code{setq}.  See the next subsection for a sample initialization file.

@c ---------------------------------------------------------------------------
@node Sample file,  , File syntax, Initialization file
@section A sample file

This is an initialization file that shows the default variable settings.
You can use it as a model for your own init file.

@include dotzile.texi

@c ---------------------------------------------------------------------------
@node Getting help, Key names, Initialization file, Top
@chapter Getting help

This table contains the commands that can be used during an editing
session to get help.

@table @kbd
@item C-h C-f, @key{f1} C-f
Show the Frequently Asked Questions about Zile.
@item C-h f, @key{f1} f
Describe a function.
@item C-h h, @key{f1} h, @key{f1} @key{f1}
Show this manual.
@item C-h k, @key{f1} k
Describe a key sequence.
@item C-h b, @key{f1} b
Show the defined bindings.
@item C-h t, @key{f1} t
Show a tutorial window.
@item C-h v, @key{f1} v
Describe a variable.
@item C-h w, @key{f1} w
Show the key or keys to which a command is bound.
@end table

@c ---------------------------------------------------------------------------
@node Key names, Functions, Getting help, Top
@chapter Key names

This table contains the names of the keys that are used in Zile.

@table @key
@item SPC
Space
@item RET
Return
@item TAB
Tab
@item BACKSPACE
Backspace
@item ESC
Escape
@item DELETE
Delete
@item CTRL
Control
@item META
Meta (also known as @key{EDIT} or @key{ALT} on some keyboards).
@item PRIOR
PgUp (page up) (also called @key{PAGEUP}).
@item NEXT
PgDn (page down) (also called @key{PAGEDOWN}).
@end table

In key combinations, like @kbd{M-g}, the @kbd{M-} prefix means hold the
@key{META} (or @key{EDIT} or @key{ALT}) key down while typing @kbd{g}.
The combination @kbd{C-x} means hold the @key{CTRL} key down while
typing @kbd{x}.

@c ---------------------------------------------------------------------------
@node Functions, Variables, Key names, Top
@chapter Functions

This table contains the full list of available functions, that can be
called with the @kbd{M-x} key (most functions also have a key binding).

@c LINT FUNC
@table @code
@item auto-fill-mode
Toggle @i{Auto Fill Mode}.
In @i{Auto Fill Mode}, inserting a space at a column beyond @samp{fill-column}
automatically breaks the line at a previous space.
@item back-to-indentation
Move point to the first non-whitespace character on this line.
@item backward-char
Move point left one character.
On attempt to pass beginning or end of buffer, stop and signal error.
@item backward-delete-char
Delete the previous character.
Join lines if the character is a newline.
@item backward-kill-word
Kill characters backward until encountering the end of a word.
With argument, do this that many times.
@item backward-paragraph
Move backward to start of paragraph.  With argument N, do it N times.
@item backward-sexp
Move backward across one balanced expression (sexp).
With argument, do it that many times.  Negative arg -N means
move forward across N balanced expressions.
@item backward-word
Move backward until encountering the end of a word (forward if the
argument is negative).
With argument, do this that many times.
@item beginning-of-buffer
Move point to the beginning of the buffer; leave mark at previous position.
@item beginning-of-line
Move point to beginning of current line.
@item call-last-kbd-macro
Call the last keyboard macro that you defined with @kbd{C-x (}.
A prefix argument serves as a repeat count.
@item capitalize-word
Capitalize the following word (or argument N words), moving over.
This gives the word(s) a first character in upper case and the rest
lower case.
@item cd
Make the user specified directory become the current buffer's default
directory.
@item copy-region-as-kill
Save the region as if killed, but don't kill it.
@item copy-to-register
Copy region into the user specified register.
@item delete-blank-lines
On blank line, delete all surrounding blank lines, leaving just one.
On isolated blank line, delete that one.
On non-blank line, delete any immediately following blank lines.
@item delete-char
Delete the following character.
Join lines if the character is a newline.
@item delete-horizontal-space
Delete all spaces and tabs around point.
@item delete-other-windows
Make the selected window fill the screen.
@item delete-region
Delete the text between point and mark.
@item delete-window
Remove the current window from the screen.
@item describe-bindings
Show a list of all defined keys, and their definitions.
@item describe-function
Display the full documentation of a function.
@item describe-key
Display documentation of the function invoked by a key sequence.
@item describe-variable
Display the full documentation of a variable.
@item downcase-region
Convert the region to lower case.
@item downcase-word
Convert following word (or argument N words) to lower case, moving over.
@item end-kbd-macro
Finish defining a keyboard macro.
The definition was started by @kbd{C-x (}.
The macro is now available for use via @kbd{C-x e}.
@item end-of-buffer
Move point to the end of the buffer; leave mark at previous position.
@item end-of-line
Move point to end of current line.
@item enlarge-window
Make current window one line bigger.
@item exchange-point-and-mark
Put the mark where point is now, and point where the mark is now.
@item execute-extended-command
Read function name, then read its arguments and call it.
@item fill-paragraph
Fill paragraph at or after point.
@item find-alternate-file
Find the file specified by the user, select its buffer, kill previous buffer.
If the current buffer now contains an empty file that you just visited
(presumably by mistake), use this command to visit the file you really want.
@item find-file
Edit the specified file.
Switch to a buffer visiting the file,
creating one if none already exists.
@item find-file-read-only
Edit the specified file but don't allow changes.
Like `find-file' but marks buffer as read-only.
Use M-x toggle-read-only to permit editing.
@item forward-char
Move point right one character.
On reaching end of buffer, stop and signal error.
@item forward-line
Move N lines forward (backward if N is negative).
Precisely, if point is on line I, move to the start of line I + N.
@item forward-paragraph
Move forward to end of paragraph.  With argument N, do it N times.
@item forward-sexp
Move forward across one balanced expression (sexp).
With argument, do it that many times.  Negative arg -N means
move backward across N balanced expressions.
@item forward-word
Move point forward one word (backward if the argument is negative).
With argument, do this that many times.
@item global-set-key
Bind a command to a key sequence.
Read key sequence and function name, and bind the function to the key
sequence.
@item goto-char
Read a number N and move the cursor to character number N.
Position 1 is the beginning of the buffer.
@item goto-line
Move cursor to the beginning of the specified line.
Line 1 is the beginning of the buffer.
@item help
Show a help window.
@item help-with-tutorial
Show a tutorial.
@item indent-for-tab-command
Indent line or insert a tab.
Depending on @i{tab-always-indent}, either insert a tab or indent.
If initial point was within line's indentation, position after
the indentation.  Else stay at same point in text.
@item indent-relative
Space out to under next indent point in previous nonblank line.
An indent point is a non-whitespace character following whitespace.
If the previous nonblank line has no indent points beyond the
column point starts at, @i{tab-to-tab-stop} is done instead, unless
this command is invoked with a numeric argument, in which case it
does nothing.
@item insert-buffer
Insert after point the contents of the user specified buffer.
Puts mark after the inserted text.
@item insert-file
Insert contents of the user specified file into buffer after point.
Set mark after the inserted text.
@item insert-register
Insert contents of the user specified register.
Puts point before and mark after the inserted text.
@item isearch-backward
Do incremental search backward.
With a prefix argument, do a regular expression search instead.
As you type characters, they add to the search string and are found.
Type return to exit, leaving point at location found.
Type @kbd{C-r} to search again backward, @kbd{C-s} to search again forward.
@kbd{C-g} when search is successful aborts and moves point to starting point.
@item isearch-backward-regexp
Do incremental search forward for regular expression.
With a prefix argument, do a regular string search instead.
Like ordinary incremental search except that your input
is treated as a regexp.  See @kbd{C-s} for more info.
@item isearch-forward
Do incremental search forward.
With a prefix argument, do an incremental regular expression search instead.
As you type characters, they add to the search string and are found.
Type return to exit, leaving point at location found.
Type @kbd{C-s} to search again forward, @kbd{C-r} to search again backward.
@kbd{C-g} when search is successful aborts and moves point to starting point.
@item isearch-forward-regexp
Do incremental search forward for regular expression.
With a prefix argument, do a regular string search instead.
Like ordinary incremental search except that your input
is treated as a regexp.  See @kbd{C-s} for more info.
@item just-one-space
Delete all spaces and tabs around point, leaving one space.
@item keyboard-quit
Cancel current command.
@item kill-buffer
Kill the current buffer or the user specified one.
@item kill-line
Kill the rest of the current line; if no non-blanks there, kill thru newline.
@item kill-region
Kill between point and mark.
The text is deleted but saved in the kill ring.
The command @kbd{C-y} (yank) can retrieve it from there.

If the buffer is read-only, Zile will beep and refrain from deleting
the text, but put the text in the kill ring anyway.  This means that
you can use the killing commands to copy text from a read-only buffer.

If the previous command was also a kill command,
the text killed this time appends to the text killed last time
to make one entry in the kill ring.
@item kill-sexp
Kill the sexp (balanced expression) following the cursor.
With ARG, kill that many sexps after the cursor.
Negative arg -N means kill N sexps before the cursor.
@item kill-word
Kill characters forward until encountering the end of a word.
With argument, do this that many times.
@item list-buffers
Display a list of names of existing buffers.
The list is displayed in a buffer named @samp{*Buffer List*}.
Note that buffers with names starting with spaces are omitted.

@c LINT IGNORE
@itemize -
@item The @samp{M} column contains a @samp{*} for buffers that are modified.
@item The @samp{R} column contains a @samp{%} for buffers that are read-only.
@end itemize
@c LINT END IGNORE
@item list-registers
List defined registers.
@item mark-paragraph
Put point at beginning of this paragraph, mark at end.
The paragraph marked is the one that contains point or follows point.
@item mark-sexp
Set mark argument sexps from point.
The place mark goes is the same place @kbd{C-M-f} would
move to with the same argument.
@item mark-whole-buffer
Put point at beginning and mark at end of buffer.
@item mark-word
Set mark argument words away from point.
@item name-last-kbd-macro
Assign a name to the last keyboard macro defined.
Argument SYMBOL is the name to define.
The symbol's function definition becomes the keyboard macro string.
Such a "function" cannot be called from Lisp, but it is a valid editor command.
@item newline
Insert a newline at the current point position into
the current buffer.
@item newline-and-indent
Insert a newline, then indent.
Indentation is done using the @i{indent-for-tab-command} function.
@item next-line
Move cursor vertically down one line.
If there is no character in the target line exactly in the current column,
the cursor is positioned after the character in that line which spans this
column, or at the end of the line if it is not long enough.
@item open-line
Insert a newline and leave point before it.
@item other-window
Select the first different window on the screen.
All windows are arranged in a cyclic order.
This command selects the window one step away in that order.
@item overwrite-mode
In @i{Overwrite Mode}, printing characters typed in replace existing text
on a one-for-one basis, rather than pushing it to the right.  At the
end of a line, such characters extend the line.
@kbd{C-q} still inserts characters in @i{Overwrite Mode}; this
is supposed to make it easier to insert characters when necessary.
@item previous-line
Move cursor vertically up one line.
If there is no character in the target line exactly over the current column,
the cursor is positioned after the character in that line which spans this
column, or at the end of the line if it is not long enough.
@item query-replace
Replace occurrences of a string with other text.
As each match is found, the user must type a character saying
what to do with it.
@item quoted-insert
Read next input character and insert it.
This is useful for inserting control characters.
You may also type up to 3 octal digits, to insert a character with that code.
@item recenter
Center point in window and redisplay screen.
The desired position of point is always relative to the current window.
@item replace-string
Replace occurrences of a string with other text.
@item save-buffer
Save current buffer in visited file if modified.  By default, makes the
previous version into a backup file if this is the first save.
@item save-buffers-kill-zile
Offer to save each buffer, then kill this Zile process.
@item save-some-buffers
Save some modified file-visiting buffers.  Asks user about each one.
@item scroll-down
Scroll text of current window downward near full screen.
@item scroll-up
Scroll text of current window upward near full screen.
@item search-backward
Search backward from point for the user specified text.
@item search-backward-regexp
Search backward from point for match for regular expression REGEXP.
@item search-forward
Search forward from point for the user specified text.
@item search-forward-regexp
Search forward from point for regular expression REGEXP.
@item self-insert-command
Insert the character you type.
@item set-fill-column
Set the fill column.
If an argument value is passed, set the @samp{fill-column} variable with
that value, otherwise with the current column value.
@item set-mark-command
Set mark at where point is.
@item set-variable
Set a variable value to the user specified value.
@item shell-command
Reads a line of text using the minibuffer and creates an inferior shell
to execute the line as a command.

Standard input from the command comes from the null device.  If the
shell command produces any output, the output goes to a Zile buffer
named @samp{*Shell Command Output*}, which is displayed in another window
but not selected.

If the output is one line, it is displayed in the echo area.
A numeric argument, as in @kbd{M-1 M-!} or @kbd{C-u M-!}, directs this
command to insert any output into the current buffer.
@item shell-command-on-region
Reads a line of text using the minibuffer and creates an inferior shell
to execute the line as a command; passes the contents of the region as
input to the shell command.

If the shell command produces any output, the output goes to a Zile buffer
named @samp{*Shell Command Output*}, which is displayed in another window
but not selected.

If the output is one line, it is displayed in the echo area.
A numeric argument, as in @kbd{M-1 M-|} or @kbd{C-u M-|}, directs output
to the current buffer,
then the old region is deleted first and the output replaces it as the
contents of the region.
@item shrink-window
Make current window one line smaller.
@item split-window
Split current window into two windows, one above the other.
Both windows display the same buffer now current.
@item start-kbd-macro
Record subsequent keyboard input, defining a keyboard macro.
The commands are recorded even as they are executed.
Use @kbd{C-x )} to finish recording and make the macro available.
@item suspend-zile
Stop Zile and return to superior process.
@item switch-to-buffer
Select to the user specified buffer in the current window.
@item tab-to-tab-stop
Insert a tabulation at the current point position into
the current buffer.
@item tabify
Convert multiple spaces in region to tabs when possible.
A group of spaces is partially replaced by tabs
when this can be done without changing the column they end at.
The variable @samp{tab-width} controls the spacing of tab stops.
@item toggle-read-only
Change whether this buffer is visiting its file read-only.
@item transient-mark-mode
Toggle Transient Mark mode.
With arg, turn Transient Mark mode on if arg is positive, off otherwise.
@item transpose-chars
Interchange characters around point, moving forward one character.
If at end of line, the previous two chars are exchanged.
@item transpose-lines
Exchange current line and previous line, leaving point after both.
With argument ARG, takes previous line and moves it past ARG lines.
With argument 0, interchanges line point is in with line mark is in.
@item transpose-sexps
Like @kbd{M-t} but applies to sexps.
@item transpose-words
Interchange words around point, leaving point at end of them.
@item undo
Undo some previous changes.
Repeat this command to undo more changes.
@item universal-argument
Begin a numeric argument for the following command.
Digits or minus sign following @kbd{C-u} make up the numeric argument.
@kbd{C-u} following the digits or minus sign ends the argument.
@kbd{C-u} without digits or minus sign provides 4 as argument.
Repeating @kbd{C-u} without digits or minus sign multiplies the argument
by 4 each time.
@item untabify
Convert all tabs in region to multiple spaces, preserving columns.
The variable @samp{tab-width} controls the spacing of tab stops.
@item upcase-region
Convert the region to upper case.
@item upcase-word
Convert following word (or argument N words) to upper case, moving over.
@item view-zile-FAQ
Show the Zile @i{Frequently Asked Questions} list (FAQ).
@item where-is
Show the key or keys to which the given command is bound.
@item write-file
Write current buffer into the user specified file.
Makes buffer visit that file, and marks it not modified.
@item yank
Reinsert the last stretch of killed text.
More precisely, reinsert the stretch of killed text most recently
killed @i{or} yanked.  Put point at end, and set mark at beginning.
@item zile-version
Show the version of Zile.
@end table
@c LINT END FUNC

@c ---------------------------------------------------------------------------
@node Variables, Bug reports, Functions, Top
@chapter Variables

This table contains the full list of available variables, that can be
modified at run-time with the @samp{set-variable} function or set at start-up
in the @file{.zile} initialization file.

@c LINT VAR
@table @code
@item auto-fill-mode
If non-nil, @i{Auto Fill Mode} is automatically enabled.  Default
value is @samp{nil}.
@item backup-directory
The directory for backup files, which must exist.  If this variable is
@samp{nil}, the backup is made in the original file's directory.
Default value is @samp{nil}.
@item case-fold-search
Non-nil means searches ignore case.
@item case-replace
Non-nil means `query-replace' should preserve case in replacements.
@item fill-column
Column beyond which automatic line-wrapping should happen.
Automatically becomes buffer-local when set in any fashion.
Default value is @samp{72}.
@item highlight-nonselected-windows
If non-nil, highlight region even in nonselected windows.  Default
value is @samp{nil}.
@item indent-tabs-mode
If non-nil, insert-tab inserts `real' tabs; otherwise, it always inserts spaces.
Default value is @samp{nil}.
@item inhibit-splash-screen
Non-nil inhibits the startup screen.
It also inhibits display of the initial message in the `*scratch*' buffer.
Default value is @samp{nil}.
@item kill-whole-line
If non-nil, `kill-line' with no arg at the beginning of a line kills the whole line.
Default value is @samp{nil}.
@item make-backup-files
Non-nil means make a backup of a file the first time it is saved.
This is done by appending `@samp{~}' to the file name.
Default value is @samp{t}.
@item ring-bell
Non-nil means ring the terminal bell on any error.
Default value is @samp{t}.
@item standard-indent
Default number of columns for margin-changing functions to indent.
Default values is @samp{4}.
@item tab-always-indent
Controls the operation of the @kbd{TAB} key.
If @samp{t}, hitting @kbd{TAB} always just indents the current line.
If @samp{nil}, hitting @kbd{TAB} indents the current line if point is at the
left margin or in the line's indentation, otherwise it inserts a
"real" TAB character.
Default value is @samp{t}.
@item tab-width
Distance between tab stops (for display of tab characters), in columns.
Automatically becomes buffer-local when set in any fashion.
Default value is @samp{8}.
@item transient-mark-mode
If non-nil, deactivates the mark when the buffer contents change.
Also enables highlighting of the region whenever the mark is active.
The variable `highlight-nonselected-windows' controls whether to
highlight all windows or just the selected window.
Default value is @samp{t}.
@end table
@c LINT END VAR

@c ---------------------------------------------------------------------------
@node Bug reports,  , Variables, Top
@chapter Bug reports

Any questions, comments, or bug reports should be sent to the
developers at @email{zile-devel@@lists.sourceforge.net}, or even better,
filed in the relevant tracker at @uref{http://sourceforge.net/projects/zile/}.

@contents

@bye

Local Variables:
compile-command: "texi2dvi zile.texi"
End:

@c  LocalWords:  Zile Sigala Capello
