summaryrefslogtreecommitdiff
path: root/gramscii.1
diff options
context:
space:
mode:
Diffstat (limited to 'gramscii.1')
-rw-r--r--gramscii.156
1 files changed, 54 insertions, 2 deletions
diff --git a/gramscii.1 b/gramscii.1
index 82c2fb3..c7f5c2f 100644
--- a/gramscii.1
+++ b/gramscii.1
@@ -4,6 +4,9 @@ gramscii \- simple editor for ASCII box diagrams
.SH SYNOPSIS
.PP
gramscii
+.RI [-s]
+.RI [-h]
+.RI [file ...]
.PP
.SH DESCRIPTION
.PP
@@ -11,6 +14,18 @@ gramscii is a simple interactive editor to create ASCII box-and-arrows
diagrams. It uses vi-like keybindings for drawing and editing boxes,
arrows, and text.
.PP
+.SH OPTIONS
+.TP 5m
+.BI -s
+Start gramscii in script-mode. In this mode the screen is set to 25 rows
+by 80 columns, no status bar is present, drawings and cursor movements
+are not shown, and the state of the screen is dumped to stdout when the
+program ends. With this flag, gramscii can be used in a pipeline,
+getting commands from stdin (or from a file) and making its output
+available for further processing.
+.TP
+.BI -h
+Print short usage unstructions and exit.
.SH COMMANDS
gramscii is a visual modal editor. Commands are associated to
keystrokes, and keystrokes have different meaning in different modes.
@@ -97,7 +112,9 @@ move the cursor right by 1 column
.PP
gramscii accepts also the uppercase commands
.B H, J, K, L,
-which will move in the corresponding direction by 5 units at a time.
+which will move in the corresponding direction by a LONG_STEP number of
+units at a time (defaults to 5, change LONG_STEP in config.h as you
+wish).
.TP 5m
.BI g
Initiate a global positioning command (go). These are two-letter
@@ -152,8 +169,35 @@ Typing
.BI g
followed by any character that is not listed above has no effect on the
cursor.
+.SS MULTIPLIERS
+Simple cursor movement commands (hjklHJKL) can be preceded by a number
+that acts as a multiplier. For instance, the command:
+.PP
+.RS
+14h
+.PP
.RE
-
+will move the cursor by 14 steps to the left. Similarily, the command:
+.PP
+.RS
+7J
+.PP
+.RE
+will move the cursor by 7 LONG_STEPs rows down (with the default
+LONG_STEP equal to 5, this will correspond to 35 rows down).
+.PP
+Multipliers can be used whenever a movement command is legal, i.e. in
+move, box, arrox, visual, and erase mode. So for instance the sequence:
+.RS
+ggb13l18jb
+.PP
+.RE
+will draw a 18x13 box whose top-left corner coincides with the top-left
+corner of the screen.
+.PP
+Multipliers are ignored by global positioning commands (i.e., those
+starting with
+.B g)
.SS MODES
The currently supported modes are:
.B move,
@@ -233,6 +277,14 @@ styles. See
.B STYLES
below for more information.
.TP 7m
+.BI A
+Exactly as
+.BI a
+toggles
+.B arrow
+mode, but the end point marker is automatically set according to the
+direction of the arrow.
+.TP 7m
.BI x
Toggle
.B erase