Discussion:
[Nano-devel] [PATCH] new feature: ability to toogle and jump to bookmarks
Marco Diego Aurélio Mesquita
2018-11-12 20:39:34 UTC
Permalink
Attached patch adds bookmarks feature to nano.

Difference from previous patch is that now it is bound by default
to M-Ins, M-PgUp and M-PgDn to, respectively, toogle bookmarks,
jump to previous bookmark and jump to next bookmark.

Please review it.
Brand Huntsman
2018-11-13 00:34:44 UTC
Permalink
On Mon, 12 Nov 2018 18:39:34 -0200
Post by Marco Diego Aurélio Mesquita
Difference from previous patch is that now it is bound by default
to M-Ins, M-PgUp and M-PgDn to, respectively, toogle bookmarks,
jump to previous bookmark and jump to next bookmark.
You forgot to support linux console and escape sequences for the new keys, search for ALT_DELETE in winio.c.

URxvt.keysym.M-Insert: \033[2;3~
URxvt.keysym.M-PageUp: \033[5;3~
URxvt.keysym.M-PageDown: \033[6;3~

Set a bookmark in the middle of a line, cut the entire line and undo the cut. Now move down a few lines and use M-PgUp. It jumps to end of line below the bookmark line, pressing again jumps to end of bookmark line. Now move up a few lines and use M-PgDn. It jumps to end of bookmark line and another press jumps to end of line after the bookmark line. Pressing up or down arrows after the first or second press of M-PgUp/PgDn acts as if the cursor had been on the bookmark instead of at the end of line.
Loading...