Commit Graph

20 Commits (bec0cdcb5456bc1e6fd40745f7af78a7f1f31c69)

Author SHA1 Message Date
Benno Schulenberg 9f8309fba8 help: use smaller triangles for the arrows
In Dejavu Sans Mono the old pointing triangles had a decent size,
but in Noto Mono and in Ubuntu Mono (fonts that handle combining
diacritics better) those triangles were massive, visually taking
up more than a single cell, overlapping the closing parenthesis
when they are displayed in the second column.  Not nice.

The new pointing small triangles look good in the Noto and Ubuntu
fonts, but are real tiny in Dejavu.  :|  Oh well, one can't have
everything.

(Other triangles are not an option, because they don't degrade to
actual arrows when on a Linux console.)
2021-06-14 09:29:27 +02:00
Benno Schulenberg 635977fe33 syntax: nanohelp: avoid colorizing M-) in (M-) and M-" in "M-"
Instead of quoting M- as 'M-', some translations use «M-» (Catalan),
(M-) (Croat), "M-" (Italian), „M-” (Romanian), or „М-“ (Serbian).
Those occurrences of M- nor its quotation marks should be colored.

Achieve this by excluding those quotation marks from the M- regex,
and then colorizing M-) and M-" only when at start of line (first
column of shortcuts) or when between parentheses (second column).
2021-05-30 10:44:03 +02:00
Benno Schulenberg d1957819c4 bindings: show either "^/" or "^-" in the help lines, instead of "^_"
The "^_" has always been poorly legible (the underscore melting into
the bottom of the terminal) and difficult to type (Shift+Ctrl+minus).
The "^/" is both more readable and easier to type.

In terminal emulators, "^/" is shown, but on a Linux console "^-",
as ^/ does a backspace in the default console key mapping.

Also, allow using "^-" when rebinding ^_ in a nanorc file.

This addresses https://savannah.gnu.org/bugs/?57393.
2021-05-22 16:52:56 +02:00
Benno Schulenberg f9baa4de71 syntax: nanohelp, nanorc: colorize the Sh-M-X format as a valid key name 2020-01-23 11:11:34 +01:00
Benno Schulenberg 54b97a6f03 bindings: allow to rebind also ^`, although it is synonymous with ^Space
Since ^@ is rebindable too and also a synonym of ^Space, it makes
more sense to allow the user to specify ^` instead, as it is an
unshifted keystroke on US keyboards.

Also, color ^` as valid in a nanorc file, and color ^` and ^@ in
the help viewer.
2020-01-20 17:19:23 +01:00
Benno Schulenberg 00b0316ab8 syntax: nanohelp: colorize also ^/ as a possible keystroke
(In addition, colorize F20...F24 too.)

This fixes https://savannah.gnu.org/bugs/?57390.

Bug existed since version 4.6, commit 2a97cb9f.
2019-12-10 15:42:28 +01:00
Benno Schulenberg e938c24d04 tweaks: renumber a couple of symbols, and reshuffle a bit of code
Also, contract the regex for key strings.
2018-11-07 19:30:04 +01:00
David Lawrence Ramsey f55a3fabef input: recognize some escape sequences for <Shift+Delete>
Also, hard-bind <Shift+Delete> in the same way as <Backspace>.

This fixes https://savannah.gnu.org/bugs/?54948,
and fixes https://savannah.gnu.org/bugs/?54975.
2018-11-07 19:17:16 +01:00
David Lawrence Ramsey 5f1b618a5a syntax: nanohelp: properly color the keystroke "Sh-^Del"
This fixes https://savannah.gnu.org/bugs/?54758.
2018-09-30 20:40:20 +02:00
Benno Schulenberg ac102a7516 tweaks: show "Space" and "Bsp" in the help text of the browser
These keys make more mnemonic sense for scrolling than F7 and F8.

Also adjust the nanohelp syntax to cover the lone word "Space".
2018-07-31 20:36:32 +02:00
Benno Schulenberg 8f1a657a37 bindings: revert the ^/ changes, as ^/ is not always Go-To-Line
On a Linux console, ^/ produces Backspace, making it unrebindable.

This fixes https://savannah.gnu.org/bugs/?53248.
2018-03-01 09:50:54 +01:00
Benno Schulenberg 082e5db4b7 syntax: color also ^/ in nano's help texts and in nanorc files
As of commit c79fe1a1, the more readable ^/ has replaced ^_ as the
advertised shortcut for Go-To-Line -- color it too as valid.
2018-02-27 18:06:33 +01:00
Benno Schulenberg 3e1fc6385b syntaxes: remove quotes from each syntax name, and color it differently
The different color will make the name stand out, as it should, instead
of looking the same as all the regex strings.
2018-02-14 17:36:50 +01:00
Benno Schulenberg 8067efa6cc syntax: nanohelp: color also the Sh-Tab key combo 2018-01-09 16:34:31 +01:00
Benno Schulenberg 58ecc034d0 tweaks: change the help-text arrows to triangles, to be more visible
Requested-by: Brand Huntsman <alpha@qzx.com>
2017-10-15 21:23:33 +02:00
Benno Schulenberg d0119833c1 tweaks: reshuffle some regexes, for order and compactness 2017-10-11 21:52:18 +02:00
Brand Huntsman d4074ca85b syntax: nanohelp: colorize Up, Down, Left and Right (when not in UTF-8)
Signed-off-by: Brand Huntsman <alpha@qzx.com>
2017-10-11 21:50:47 +02:00
Benno Schulenberg da67883508 syntax: nanohelp: color also ^6 as a shortcut keystroke
(Hadn't seen that one because of my additional bindings.)
2017-05-07 20:00:52 +02:00
Benno Schulenberg 17cf7d1c62 syntax: nanohelp: change the hue of the keystrokes to match sample.nanorc
And because I think it looks slightly better.
2017-04-30 17:37:07 +02:00
Benno Schulenberg 9cff7a1689 help: use a dedicated syntax to color shortcuts in a help text
This avoids applying the default syntax, or the syntax specified
with --syntax, to a ^G help text.
2017-04-25 17:21:46 +02:00