mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-30 06:37:14 +09:00
Merge pull request #3812 from dmaluka/update-manpage
Update man page + change `[FILE]:LINE:COL` to `FILE[:LINE:COL]` in `micro -help`
This commit is contained in:
@@ -1,13 +1,17 @@
|
|||||||
.TH micro 1 "2020-02-10"
|
.TH micro 1 "2025-08-16"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
micro \- A modern and intuitive terminal-based text editor
|
micro \- A modern and intuitive terminal-based text editor
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B micro
|
.B micro
|
||||||
.RB [OPTIONS]
|
.RI [ OPTION ]...\&
|
||||||
[FILE]\&...
|
.RI [ FILE ]...\&
|
||||||
|
.RI [+ LINE [: COL ]]
|
||||||
|
.br
|
||||||
|
.B micro
|
||||||
|
.RI [ OPTION ]...\&
|
||||||
|
.RI [ FILE [: LINE [: COL ]]]...\&
|
||||||
|
\& (only if the `parsecursor` option is enabled)
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
|
||||||
Micro is a terminal-based text editor that aims to be easy to use and intuitive, while also taking advantage of the full capabilities
|
Micro is a terminal-based text editor that aims to be easy to use and intuitive, while also taking advantage of the full capabilities
|
||||||
of modern terminals. It comes as one single, batteries-included, static binary with no dependencies.
|
of modern terminals. It comes as one single, batteries-included, static binary with no dependencies.
|
||||||
|
|
||||||
@@ -15,73 +19,80 @@ As the name indicates, micro aims to be somewhat of a successor to the nano edit
|
|||||||
enjoyable to use full time, whether you work in the terminal because you prefer it (like me), or because you need to (over ssh).
|
enjoyable to use full time, whether you work in the terminal because you prefer it (like me), or because you need to (over ssh).
|
||||||
|
|
||||||
Use Ctrl-q to quit, Ctrl-s to save, and Ctrl-g to open the in-editor help menu.
|
Use Ctrl-q to quit, Ctrl-s to save, and Ctrl-g to open the in-editor help menu.
|
||||||
|
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
.PP
|
.PP
|
||||||
\-clean
|
.B \-clean
|
||||||
.RS 4
|
.RS 4
|
||||||
Cleans the configuration directory
|
Clean the configuration directory and exit
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
\-config-dir dir
|
.B \-config-dir
|
||||||
|
.I dir
|
||||||
.RS 4
|
.RS 4
|
||||||
Specify a custom location for the configuration directory
|
Specify a custom location for the configuration directory
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
[FILE]:LINE:COL
|
.IR FILE : LINE [: COL ]
|
||||||
|
(only if the `parsecursor` option is enabled)
|
||||||
|
.br
|
||||||
|
.IR FILE \ + LINE [: COL ]
|
||||||
.RS 4
|
.RS 4
|
||||||
Specify a line and column to start the cursor at when opening a buffer
|
Specify a line and column to start the cursor at when opening a buffer
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
\-options
|
.B \-options
|
||||||
.RS 4
|
.RS 4
|
||||||
Show all option help
|
Show all options help and exit
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
\-debug
|
.B \-debug
|
||||||
.RS 4
|
.RS 4
|
||||||
Enable debug mode (enables logging to ./log.txt)
|
Enable debug mode (enables logging to ./log.txt)
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
\-version
|
.B \-profile
|
||||||
.RS 4
|
.RS 4
|
||||||
Show the version number and information
|
Enable CPU profiling (writes profile info to ./micro.prof so it can be analyzed later with "go tool pprof micro.prof")
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
.B \-version
|
||||||
|
.RS 4
|
||||||
|
Show the version number and information and exit
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
Micro's plugins can be managed at the command line with the following commands.
|
Micro's plugins can be managed at the command line with the following commands.
|
||||||
.RS 4
|
.RS 4
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
\-plugin remove [PLUGIN]...
|
.B \-plugin install
|
||||||
|
.RI [ PLUGIN ]...
|
||||||
|
.RS 4
|
||||||
|
Install plugin(s)
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
.B \-plugin remove
|
||||||
|
.RI [ PLUGIN ]...
|
||||||
.RS 4
|
.RS 4
|
||||||
Remove plugin(s)
|
Remove plugin(s)
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
\-plugin update [PLUGIN]...
|
.B \-plugin update
|
||||||
|
.RI [ PLUGIN ]...
|
||||||
.RS 4
|
.RS 4
|
||||||
Update plugin(s) (if no argument is given, updates all plugins)
|
Update plugin(s) (if no argument is given, updates all plugins)
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
\-plugin search [PLUGIN]...
|
.B \-plugin search
|
||||||
|
.RI [ PLUGIN ]...
|
||||||
.RS 4
|
.RS 4
|
||||||
Search for a plugin
|
Search for a plugin
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
\-plugin list
|
.B \-plugin list
|
||||||
.RS 4
|
.RS 4
|
||||||
List installed plugins
|
List installed plugins
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
\-plugin available
|
.B \-plugin available
|
||||||
.RS 4
|
.RS 4
|
||||||
List available plugins
|
List available plugins
|
||||||
.RE
|
.RE
|
||||||
@@ -91,35 +102,33 @@ Micro's options can also be set via command line arguments for quick
|
|||||||
adjustments. For real configuration, please use the settings.json
|
adjustments. For real configuration, please use the settings.json
|
||||||
file (see 'help options').
|
file (see 'help options').
|
||||||
.RS 4
|
.RS 4
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
\-option value
|
.BI \-< option >
|
||||||
|
.I value
|
||||||
.RS 4
|
.RS 4
|
||||||
Set `option` to `value` for this session
|
Set `option` to `value` for this session.
|
||||||
|
.br
|
||||||
For example: `micro -syntax off file.c`
|
For example: `micro -syntax off file.c`
|
||||||
.RE
|
.RE
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
Use `micro -options` to see the full list of configuration options.
|
||||||
.SH CONFIGURATION
|
.SH CONFIGURATION
|
||||||
|
|
||||||
Micro uses $MICRO_CONFIG_HOME as the configuration directory.
|
Micro uses $MICRO_CONFIG_HOME as the configuration directory.
|
||||||
If this environment variable is not set, it uses $XDG_CONFIG_HOME/micro instead.
|
If this environment variable is not set, it uses $XDG_CONFIG_HOME/micro instead.
|
||||||
If that environment variable is not set, it uses ~/.config/micro as the configuration directory.
|
If that environment variable is not set, it uses ~/.config/micro as the configuration directory.
|
||||||
In the documentation, we use ~/.config/micro to refer to the configuration directory
|
In the documentation, we use ~/.config/micro to refer to the configuration directory
|
||||||
(even if it may in fact be somewhere else if you have set either of the above environment variables).
|
(even if it may in fact be somewhere else if you have set either of the above environment variables).
|
||||||
|
|
||||||
.SH NOTICE
|
.SH NOTICE
|
||||||
This manpage is intended only to serve as a quick guide to the invocation of
|
This manpage is intended only to serve as a quick guide to the invocation of
|
||||||
micro and is not intended to replace the full documentation included with micro
|
micro and is not intended to replace the full documentation included with micro
|
||||||
which can be accessed from within micro. Micro tells you what key combination to
|
which can be accessed from within micro. Micro tells you what key combination to
|
||||||
press to get help in the lower right.
|
press to get help in the lower right.
|
||||||
|
|
||||||
.SH BUGS
|
.SH BUGS
|
||||||
A comprehensive list of bugs will not be listed in this manpage. See the Github
|
A comprehensive list of bugs will not be listed in this manpage. See the Github
|
||||||
page at \fBhttps://github.com/zyedidia/micro/issues\fP for a list of known bugs
|
page at \fBhttps://github.com/zyedidia/micro/issues\fP for a list of known bugs
|
||||||
and to report any newly encountered bugs you may find. We strive to correct
|
and to report any newly encountered bugs you may find. We strive to correct
|
||||||
bugs as swiftly as possible.
|
bugs as swiftly as possible.
|
||||||
|
|
||||||
.SH COPYRIGHT
|
.SH COPYRIGHT
|
||||||
Copyright \(co 2020 Zachary Yedidia, et al. MIT license.
|
Copyright \(co 2020 Zachary Yedidia, et al. MIT license.
|
||||||
See \fBhttps://github.com/zyedidia/micro\fP for details.
|
See \fBhttps://github.com/zyedidia/micro\fP for details.
|
||||||
|
|||||||
@@ -46,24 +46,26 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func InitFlags() {
|
func InitFlags() {
|
||||||
|
// Note: keep this in sync with the man page in assets/packaging/micro.1
|
||||||
flag.Usage = func() {
|
flag.Usage = func() {
|
||||||
fmt.Println("Usage: micro [OPTIONS] [FILE]...")
|
fmt.Println("Usage: micro [OPTION]... [FILE]... [+LINE[:COL]]")
|
||||||
|
fmt.Println(" micro [OPTION]... [FILE[:LINE[:COL]]]... (only if the `parsecursor` option is enabled)")
|
||||||
fmt.Println("-clean")
|
fmt.Println("-clean")
|
||||||
fmt.Println(" \tCleans the configuration directory")
|
fmt.Println(" \tClean the configuration directory and exit")
|
||||||
fmt.Println("-config-dir dir")
|
fmt.Println("-config-dir dir")
|
||||||
fmt.Println(" \tSpecify a custom location for the configuration directory")
|
fmt.Println(" \tSpecify a custom location for the configuration directory")
|
||||||
fmt.Println("[FILE]:LINE:COL (if the `parsecursor` option is enabled)")
|
fmt.Println("FILE:LINE[:COL] (only if the `parsecursor` option is enabled)")
|
||||||
fmt.Println("+LINE:COL")
|
fmt.Println("FILE +LINE[:COL]")
|
||||||
fmt.Println(" \tSpecify a line and column to start the cursor at when opening a buffer")
|
fmt.Println(" \tSpecify a line and column to start the cursor at when opening a buffer")
|
||||||
fmt.Println("-options")
|
fmt.Println("-options")
|
||||||
fmt.Println(" \tShow all option help")
|
fmt.Println(" \tShow all options help and exit")
|
||||||
fmt.Println("-debug")
|
fmt.Println("-debug")
|
||||||
fmt.Println(" \tEnable debug mode (enables logging to ./log.txt)")
|
fmt.Println(" \tEnable debug mode (enables logging to ./log.txt)")
|
||||||
fmt.Println("-profile")
|
fmt.Println("-profile")
|
||||||
fmt.Println(" \tEnable CPU profiling (writes profile info to ./micro.prof")
|
fmt.Println(" \tEnable CPU profiling (writes profile info to ./micro.prof")
|
||||||
fmt.Println(" \tso it can be analyzed later with \"go tool pprof micro.prof\")")
|
fmt.Println(" \tso it can be analyzed later with \"go tool pprof micro.prof\")")
|
||||||
fmt.Println("-version")
|
fmt.Println("-version")
|
||||||
fmt.Println(" \tShow the version number and information")
|
fmt.Println(" \tShow the version number and information and exit")
|
||||||
|
|
||||||
fmt.Print("\nMicro's plugins can be managed at the command line with the following commands.\n")
|
fmt.Print("\nMicro's plugins can be managed at the command line with the following commands.\n")
|
||||||
fmt.Println("-plugin install [PLUGIN]...")
|
fmt.Println("-plugin install [PLUGIN]...")
|
||||||
@@ -80,7 +82,7 @@ func InitFlags() {
|
|||||||
fmt.Println(" \tList available plugins")
|
fmt.Println(" \tList available plugins")
|
||||||
|
|
||||||
fmt.Print("\nMicro's options can also be set via command line arguments for quick\nadjustments. For real configuration, please use the settings.json\nfile (see 'help options').\n\n")
|
fmt.Print("\nMicro's options can also be set via command line arguments for quick\nadjustments. For real configuration, please use the settings.json\nfile (see 'help options').\n\n")
|
||||||
fmt.Println("-option value")
|
fmt.Println("-<option> value")
|
||||||
fmt.Println(" \tSet `option` to `value` for this session")
|
fmt.Println(" \tSet `option` to `value` for this session")
|
||||||
fmt.Println(" \tFor example: `micro -syntax off file.c`")
|
fmt.Println(" \tFor example: `micro -syntax off file.c`")
|
||||||
fmt.Println("\nUse `micro -options` to see the full list of configuration options")
|
fmt.Println("\nUse `micro -options` to see the full list of configuration options")
|
||||||
|
|||||||
Reference in New Issue
Block a user