nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 34dda6461069926ebe001392846527fa7fbd5cdb
parent d1c723bc149566e9c4d039b99b380c39439e6262
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun,  9 Jun 2024 08:18:39 +0200

docs: explain the behavior of the new function `cycle`

Also colorize {cycle} when found in a nanorc file.

Diffstat:
Mdoc/nano.texi | 6+++++-
Mdoc/nanorc.5 | 6+++++-
Msyntax/nanorc.nanorc | 2+-
3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/doc/nano.texi b/doc/nano.texi @@ -1643,7 +1643,11 @@ while keeping the cursor in the same text position, if possible. (This function is bound by default to @kbd{Alt+Down}.) @item center -Scrolls the line with the cursor to the middle of the screen. +Scrolls the line with the cursor to the middle of the viewport. + +@item cycle +Scrolls the line with the cursor first to the middle of the viewport, +then to the top, then to the bottom. @item prevword Moves the cursor to the beginning of the previous word. diff --git a/doc/nanorc.5 b/doc/nanorc.5 @@ -794,7 +794,11 @@ while keeping the cursor in the same text position, if possible. (This function is bound by default to <Alt+Down>.) .TP .B center -Scrolls the line with the cursor to the middle of the screen. +Scrolls the line with the cursor to the middle of the viewport. +.TP +.B cycle +Scrolls the line with the cursor first to the middle of the viewport, +then to the top, then to the bottom. .TP .B prevword Moves the cursor to the beginning of the previous word. diff --git a/syntax/nanorc.nanorc b/syntax/nanorc.nanorc @@ -29,7 +29,7 @@ color brightmagenta "[[:blank:]](start=)?".+"" color crimson "\{(help|cancel|exit|savefile|writeout|discardbuffer|insert|where(is|was)|find(previous|next|bracket)|replace)\}" color crimson "\{(cut|copy|paste|zap|chopword(left|right)|cutrestoffile|execute|mark|speller|linter|formatter|(full)?justify)\}" color crimson "\{(location|gotoline|(begin|end)para|comment|complete|(un)?indent|wordcount|(record|run)macro|anchor|undo|redo)\}" -color crimson "\{(left|right|up|down|home|end|(scroll|page)(up|down)|(top|bottom)row|center|(prev|next)(word|block|anchor|buf))\}" +color crimson "\{(left|right|up|down|home|end|(scroll|page)(up|down)|(top|bottom)row|center|cycle|(prev|next)(word|block|anchor|buf))\}" color crimson "\{(tab|enter|delete|backspace|verbatim|refresh|suspend|casesens|regexp|backwards|older|newer|(dos|mac)format)\}" color crimson "\{(append|prepend|backup|flip(goto|replace|execute|pipe|convert|newbuffer)|browser|gotodir|(first|last)(file|line))\}" color crimson "\{(nohelp|constantshow|softwrap|linenumbers|whitespacedisplay|nosyntax|zero)\}"