2017-06-03 15:27:30 -04:00
|
|
|
.Dd January 8, 2016
|
2016-02-03 13:39:37 -05:00
|
|
|
.Dt EDITOR 1
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm editor
|
|
|
|
.Nd text editor
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm editor
|
|
|
|
.Op Ar file
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
2017-02-15 16:56:28 -05:00
|
|
|
is a text editor with basic editing functionality.
|
|
|
|
It generally behaves like a GUI editor as opposed to common terminal editors.
|
|
|
|
The file named by the
|
2016-02-03 13:39:37 -05:00
|
|
|
.Ar file
|
2017-02-15 16:56:28 -05:00
|
|
|
argument is loaded if specified.
|
|
|
|
It quits when
|
2016-02-03 13:39:37 -05:00
|
|
|
.Sy Ctrl-Q
|
|
|
|
is typed.
|
|
|
|
.Pp
|
|
|
|
Text can be selected by holding the
|
|
|
|
.Sy Shift
|
|
|
|
key and moving the cursor.
|
|
|
|
.Pp
|
|
|
|
It supports these keyboard shortcuts:
|
|
|
|
.Bl -tag -width "12345768"
|
|
|
|
.It Sy Ctrl-C
|
|
|
|
Copy.
|
2021-04-27 16:40:14 -04:00
|
|
|
.It Sy Ctrl-G
|
2016-02-03 13:39:37 -05:00
|
|
|
Go to line.
|
|
|
|
.It Sy Ctrl-K
|
|
|
|
Cut.
|
|
|
|
.It Sy Ctrl-O
|
|
|
|
Open file.
|
|
|
|
.It Sy Ctrl-Q
|
|
|
|
Quit.
|
|
|
|
.It Sy Ctrl-S
|
|
|
|
Save file.
|
|
|
|
.It Sy Ctrl-V
|
|
|
|
Paste.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
These commands than can be entered after pressing
|
2016-11-20 11:54:04 -05:00
|
|
|
.Sy ESC
|
|
|
|
and a colon:
|
2016-02-03 13:39:37 -05:00
|
|
|
.Bl -tag -width "12345768"
|
|
|
|
.It Sy language Oo Sy none "|" Sy c "|" Sy c++ "|" Sy diff Oc
|
|
|
|
Select syntax highlighting.
|
|
|
|
.It Sy line-numbering Oo Sy on "|" Sy off Oc
|
|
|
|
Line numbering.
|
|
|
|
.It Sy margin Ar column-index
|
|
|
|
Display right margin at
|
|
|
|
.Ar column-index .
|
|
|
|
.It Sy popen Ar shell-command
|
|
|
|
Open new file containing output of running
|
|
|
|
.Ar shell-command .
|
|
|
|
.It Sy tabsize Ar tab-size
|
|
|
|
Select tab size.
|
|
|
|
.El
|
2016-01-01 10:01:39 -05:00
|
|
|
.Pp
|
|
|
|
A subset of these commands can be stored in the
|
|
|
|
.Xr editor 5
|
|
|
|
configuration file loaded on
|
|
|
|
.Nm
|
|
|
|
startup.
|
|
|
|
.Sh FILES
|
|
|
|
.Bl -tag -width "$HOME/.editor" -compact
|
|
|
|
.It Pa /etc/editor
|
|
|
|
Global configuration.
|
|
|
|
.It Pa ~/.editor
|
|
|
|
User configuration.
|
|
|
|
.El
|
2016-02-03 13:39:37 -05:00
|
|
|
.Sh SEE ALSO
|
2016-01-01 10:01:39 -05:00
|
|
|
.Xr pager 1 ,
|
|
|
|
.Xr editor 5
|
2016-02-03 13:39:37 -05:00
|
|
|
.Sh BUGS
|
|
|
|
.Nm
|
|
|
|
lacks a number of crucial features, such as undo and redo, ability to open
|
2017-02-15 16:56:28 -05:00
|
|
|
multiple files at once, and so on.
|
|
|
|
The syntax highlighting can occasionally be inconsistent.
|