micro: Handle +/regex search from args (#3767)

This is a feature found in vim and commonly used
by Linux kernel test robots to give context about
warnings and/or failures.

e.g. vim +/imem_size +623 drivers/net/ipa/ipa_mem.c

The order in which the commands appear in the args
determines in which order the "goto line:column"
and search will be executed.
This commit is contained in:
Luca Stefani
2025-09-05 20:53:37 +02:00
committed by GitHub
parent bbea2a3f28
commit e9f241af71
3 changed files with 89 additions and 30 deletions

View File

@@ -1,11 +1,12 @@
.TH micro 1 "2025-08-16"
.TH micro 1 "2025-09-03"
.SH NAME
micro \- A modern and intuitive terminal-based text editor
.SH SYNOPSIS
.B micro
.RI [ OPTION ]...\&
.RI [ FILE ]...\&
.RI [+ LINE [: COL ]]
.RI [+ LINE [: COL ]]\&
.RI [+/ REGEX ]
.br
.B micro
.RI [ OPTION ]...\&
@@ -40,6 +41,11 @@ Specify a custom location for the configuration directory
Specify a line and column to start the cursor at when opening a buffer
.RE
.PP
.RI +/ REGEX
.RS 4
Specify a regex to search for when opening a buffer
.RE
.PP
.B \-options
.RS 4
Show all options help and exit