Commit Graph

245 Commits (1cd92458e9934e67fc37b4e972630bbd5ffbc0f3)

Author SHA1 Message Date
Benno Schulenberg 7c698a9c3a syntax: sh: recognize some shell scripts by their Emacs modeline
This helps with recognizing most files in /usr/share/bash*/completions/,
where --magic is powerless.
2020-09-28 11:56:17 +02:00
Benno Schulenberg 2c41600957 docs: explain the purpose of -! / --magic / 'set magic'
Also, colorize 'set magic' as valid option in a nanorc file.
2020-09-25 16:35:50 +02:00
Benno Schulenberg 844c671bf1 docs: explain what the options --stateflags (-%) and 'set stateflags' do
Also, colorize 'set stateflags' as valid option in a nanorc file.
2020-09-23 19:48:03 +02:00
Benno Schulenberg cb56cd70f5 syntax: nanorc: stop coloring 'quiet' and 'backwards' and 'finalnewline'
Those options have been obsolete for a long time already.
2020-09-21 10:37:48 +02:00
Benno Schulenberg de0395bee9 syntax: nanorc: stop coloring 'nopauses' and 'nowrap' as valid
Those options are obsolete or deprecated.
2020-09-21 10:15:30 +02:00
Benno Schulenberg abb5b14281 syntax: nanorc: stop coloring 'morespace' and 'smooth' as valid
Those options are deprecated, so should not be colored green but red.
2020-09-21 10:12:31 +02:00
Ryan Westlund 11ae201d71 syntax: markdown: add author and license line
Signed-off-by: Ryan Westlund <rlwestlund@gmail.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2020-09-15 19:11:35 +02:00
Arturo Borrero González 8586efda0b syntax: nftables: include author and license lines
Signed-off-by: Arturo Borrero González <arturo@debian.org>
2020-09-14 19:52:25 +02:00
Benno Schulenberg 9e382ba691 syntaxes: add author and license lines to four of the files
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2020-09-14 19:38:29 +02:00
Benno Schulenberg 3940032cd3 syntax: po: do not leave the occasional tab with a red background color 2020-09-10 19:48:31 +02:00
Benno Schulenberg 0bc834e6f3 syntax: po: highlight embedded control codes that shouldn't be there
For some reason the Romanian PO file contains a literal ^Q in one
of its translated messages -- currently at line 1984.  This stray
^Q causes 'file' to classify po/ro.po as data.

Make such mistaken control codes easier to spot when using nano.
2020-09-08 19:38:55 +02:00
Benno Schulenberg c771167b6a tweaks: add some comments to the C syntax, and sort some keywords
Also, fold three regexes into one, eliding some redundant parentheses.
2020-09-06 11:14:16 +02:00
Hussam al-Homsi e1cf93640c syntax: c: colorize also the keywords that start with an underscore
Signed-off-by: Hussam al-Homsi <sawuare@gmail.com>
2020-09-06 10:48:07 +02:00
Hussam al-Homsi 1716f140b7 syntax: c: colorize also the 'restrict' keyword, and the #line directive
Signed-off-by: Hussam al-Homsi <sawuare@gmail.com>
2020-09-06 10:44:43 +02:00
Hussam al-Homsi cab9294f62 syntax: c: colorize also one-character constants, and the null directive
Constants that consist of a single character are valid too.
And a lone hash character on a line by itself also.

Signed-off-by: Hussam al-Homsi <sawuare@gmail.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2020-09-05 13:25:54 +02:00
Benno Schulenberg b122d3b8e5 docs: explain the 'set scrollercolor' option, for coloring the indicator
And mention that a background color does not work on libvte before 0.55.

To find out the version of libvte on your system:

  ls -R1 /usr/lib | grep libvte | grep 00 | grep -o "0\..."
2020-09-02 19:55:24 +02:00
Benno Schulenberg 8b2114a25f rcfile: allow to bind M-[ (even though it is an escape-sequence starter)
The user had better avoid using the keystroke in a macro, but
when typing directly at a responsive machine there is no problem,
M-[ is a perfectly valid and recognizable keystroke.

This fulfills https://savannah.gnu.org/bugs/?58820.
2020-08-04 17:28:16 +02:00
Benno Schulenberg 59bdce9503 syntax: default: colorize also "GNU nano 5.x" 2020-07-30 09:25:56 +02:00
Benno Schulenberg 9517766aab syntax: css: differentiate pseudo-classes (now cyan) from comments (blue)
Also, add comments, remove a duplicated ":link", and add ":checked".
2020-07-30 09:25:12 +02:00
Benno Schulenberg f502f6fdb2 syntaxes: remove unneeded backslash escapes before quotes
(They may have been needed in the past to avoid miscoloring of the
nanorc file itself, but they are no longer needed now.)
2020-07-27 13:23:13 +02:00
Benno Schulenberg aabfefde7e syntax: css: color multiline comments correctly
A forward slash does not need to be escaped, and the backslash itself
should not be escaped: it serves to escape the star, to make it literal.

Also, remove a stray end-of-line anchor ($).
2020-07-26 19:54:02 +02:00
Andreas K. Foerster ad2490c3fc syntax: ada: new file -- coloring rules for Ada 2012 files
Signed-off-by: Andreas K. Foerster <akf@akfoerster.de>
2020-06-21 09:33:14 +02:00
Benno Schulenberg af5010c96f syntax: default: colorize embedded control codes 2020-06-20 13:54:48 +02:00
Benno Schulenberg fae2eeadce rcfile: introduce the modifier 'italic', for slanted text
The modifier has to come before the foreground color name, separated
by a comma, and after 'bold,' (when present).  This has no effect on
terminals that are incapable of cursive text, like the Linux console.

This fulfills https://savannah.gnu.org/bugs/?56525.
2020-06-18 15:31:06 +02:00
Benno Schulenberg c35c5af5d8 syntax: nanorc: colorize the new named colors too, from "mint" to "mauve" 2020-06-17 11:29:05 +02:00
Benno Schulenberg 96a5aa9e90 syntax: nanorc: colorize 'bright' anyway, so existing syntaxes look okay
After a year or so, when people have had time to convert their syntaxes
to use 'bold' and/or 'light' instead of 'bright', we can drop this
colorizing, and still later stop recognizing 'bright' altogether.
2020-06-16 17:33:49 +02:00
Benno Schulenberg e998c35c53 syntax: sql: rename the file to match the name of the syntax 2020-06-16 14:44:57 +02:00
Benno Schulenberg 2fd9974e0e syntax: nanorc: stop colorizing 'bright', even though it's still accepted
The name 'bright' does not fit its effect (often bolding the typeface),
so better discourage its use.

Furthermore, colorize 'bold' and 'light' also for interface colors.
2020-06-15 15:15:06 +02:00
Benno Schulenberg c275c5158e rcfile: introduce the modifier "bold", for specifying bolding separately
This makes it possible to avoid the misnamed prefix "bright".  It is
misnamed because (on current terminal emulators, when the brightening
of bold is switched off) it just makes the typeface bold, not the color
brighter.  The prefix "light" will now only make the color brigther,
and the modifier "bold" will just make the typeface bold (on terminal
emulators, when the brightening of bold is switched off).

On a Linux console, which is not capable of bolding the typeface,
"bold" will brighten the color.

This fully fulfills https://savannah.gnu.org/bugs/?58503.
2020-06-14 11:54:18 +02:00
Benno Schulenberg adf7f33ea8 rcfile: allow specifying a bright background color (with prefix "light")
If the terminal is capable of more than eight colors, specifying
indexes 8 to 15 works fine for getting a light background color.
2020-06-14 11:51:00 +02:00
Benno Schulenberg 4d10f583e4 rcfile: accept prefix "light" to make a color brighter without bolding it
The prefix "bright" will continue to make the color brighter AND/OR
make the typeface bold (depending on how the terminal is configured
and on its capabilities), but the prefix "light" will just make the
color brighter (if the terminal can do that).

The prefix "bright" continues to do the same as what it did before,
to not change the appearance of user-defined syntaxes.  And having
an option to change the meaning of "bright"... would be confusing.

This partially fulfills https://savannah.gnu.org/bugs/?58503.
2020-06-14 11:45:45 +02:00
Benno Schulenberg 32ee39e44a docs: document the --indicator (-q) and 'set indicator' options 2020-06-04 18:52:28 +02:00
Benno Schulenberg d9106abfda rcfile: rename 'extcmd' to 'execute', to be more readable and fitting
Also, improve its description in the documentation.
2020-05-31 12:04:58 +02:00
Ryan Westlund 3480518a5c syntax: go: highlight the chan keyword, and the special +build comment
This fixes https://savannah.gnu.org/bugs/?58424
Reported-by: Ryan Westlund <rlwestlund@gmail.com>

Signed-off-by: Ryan Westlund <rlwestlund@gmail.com>
2020-05-26 16:50:31 +02:00
Benno Schulenberg d4ee6a2b53 options: rename --tempfile to --saveonexit, to be far clearer
A long option should describe what it does, not vaguely hint at it.

Also, in several places of nano's code we deal with actual temp files,
and then having a flag called TEMP_FILE that doesn't have anything to
do with temp files is somewhat confusing.
2020-04-30 19:12:54 +02:00
Benno Schulenberg e62a6964f7 syntax: sql: condense some regexes, and reduce their number 2020-04-26 19:32:44 +02:00
Benno Schulenberg 227467adb9 syntaxes: remove some superfluous outer parentheses from regexes
Also, standardize some comments, condense a few regexes, add some
word-edge anchors, and remove some superfluous backslashes.
2020-04-21 12:49:29 +02:00
Benno Schulenberg afce41c754 syntaxes: move the rules for Fortran and Povray files down to extra/
Fortran and POV-Ray files are not found on any regular install of a
Unixy system nor in common software packages.  People who want these
syntaxes will have to make a little effort to enable them.
2020-04-21 12:11:44 +02:00
Ryan Westlund 36e22c99a1 syntax: haskell: new file -- coloring rules for Haskell programs
Adapted from the original coloring rules by Alex Taber found at:
  https://github.com/scopatz/nanorc/blob/master/haskell.nanorc

Signed-off-by: Ryan Westlund <rlwestlund@gmail.com>
2020-04-21 11:56:24 +02:00
Benno Schulenberg dd25d807df syntaxes: remove some stuff that has been commented out for a long time 2020-04-20 19:22:39 +02:00
Benno Schulenberg fea5d7c612 syntaxes: uniformize the initial comment 2020-04-20 19:21:56 +02:00
Benno Schulenberg c859fd40b6 syntax: markdown: do not colorize text between two bold words as italic
Also, do not colorize the text between two stricken-through words,
do not colorize text immediately after an indented piece of code,
but do give color to a double trailing space.

Signed-off-by: Ryan Westlund <rlwestlund@gmail.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2020-04-20 13:42:00 +02:00
Benno Schulenberg 56d1214187 syntax: move distro-specific files down to a subdirectory, syntax/extra/ 2020-04-14 19:05:41 +02:00
Benno Schulenberg fb53ad9c3a syntax: markdown: new file -- coloring rules for Markdown files
First-draft-by: Ryan Westlund <rlwestlund@gmail.com>
2020-04-14 16:15:49 +02:00
Benno Schulenberg fd9f6e4619 syntax: mgp: drop the almost-empty MagicPoint file and syntax
It colored any word after a % sign.  But a good syntax would color
only the valid commands, and also the ones after a comma.
2020-04-12 10:40:29 +02:00
Benno Schulenberg 4f9bebddec syntax: email: rename file and syntax, away from the mistaken 'mutt'
Also, colorize lines that are multiply quoted, and email addresses,
and URLs.
2020-04-10 13:01:57 +02:00
Benno Schulenberg a91bc04e04 docs: update the form of an option, --suspendable / 'set suspendable' 2020-03-13 15:58:56 +01:00
Benno Schulenberg e09ed765a1 syntax: nanorc: colorize 'rawsequences', not the obsolete 'rebindkeypad'
Bug existed since version 4.0, commit b596639f.
2020-03-10 16:21:02 +01:00
Benno Schulenberg 9c70fdaef9 syntax: spec: drop invalid parentheses after "Summary"
Also, add the missing "RemovePathPostfixes", add extra word boundaries,
and reshuffle and regroup some things.
2020-02-25 11:47:11 +01:00
Benno Schulenberg 6c6a3f6bd3 syntax: spec: colorize the date and author of changelog items differently
Also, remove superfluous parentheses, add missing edge-of-word markers,
correct the "ppciseries" keyword, and fold some regexes (or elements of
them) together.
2020-02-23 20:02:48 +01:00
Benno Schulenberg e873121372 syntax: spec: add two missing % signs, and colorize also "%triggerprein"
Furthermore, actually colorize the header line of a %changelog entry,
and remove two redundant fragments and simplify their overrides.
2020-02-23 19:38:54 +01:00
Neal Gompa ad52830fb8 syntax: spec: add some keywords that were added in RPM 4.15 and 4.13
In RPM 4.15, a number of new spec section features were introduced:

* %dnl                       - macro-engine level comments
* %elif, %elifos, %elifarch  - 'else if' stanzas for conditionals
* %sourcelist                - section for listing sources line by line
* %patchlist                 - section for listing patches line by line
* %generate_buildrequires    - script section after %prep for
                               generating build dependencies

(Reference: https://rpm.org/wiki/Releases/4.15.0.html.)

An enhancement added in RPM 4.13:

* Sections for file trigger stanzas

(Reference: https://rpm.org/user_doc/file_triggers.html.)

As these are being increasingly used in Fedora and other distributions,
it's quite helpful to have syntax highlighting be up to date on handling
them.

Signed-off-by: Neal Gompa <ngompa13@gmail.com>
2020-02-23 15:12:04 +01:00
Benno Schulenberg 2651554721 syntax: nanorc: colorize all-lowercase Meta key binds as valid too
Also, colorize as valid only ASCII letters, not any Unicode letters.
2020-01-23 13:34:37 +01: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 26d88ccbb1 syntax: sh: recognize shell rc files also in dedicated directories
This fulfills https://savannah.gnu.org/bugs/?57411.
2019-12-16 19:09:48 +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 2a97cb9f41 bindings: allow to rebind ^/, even though it is synonymous with ^_
This fixes https://savannah.gnu.org/bugs/?57302.
Reported-by: Tiago Almeida <tjamadeira@gmail.com>
2019-11-26 19:25:24 +01:00
Benno Schulenberg 302ea79d1c syntaxes: put the 'linter' and 'formatter' commands on a separate line
To show that they are a different class of thing than the file-matching
regexes and the comment thing, which all kind of "describe" the file.
2019-11-04 20:56:41 +02:00
Benno Schulenberg ebeed9c013 tweaks: fuse two regexes into one 2019-11-04 20:49:17 +02:00
Benno Schulenberg 75dd9bee38 syntax: javascript: colorize the boolean values 'true' and 'false' too
Original-patch-by: Ryan Westlund <rlwestlund@gmail.com>
2019-11-03 19:50:41 +02:00
Benno Schulenberg 3f3698640b syntax: ruby: colorize also lowercase global/instance variables
And avoid recoloring the reserved words BEGIN and END as constants.

Inspired-by: Rory Thrasher <thrasher@redhat.com>
2019-10-27 16:34:06 +01:00
Benno Schulenberg b4dbbe3799 syntax: html: add a formatter command, making use of 'tidy' 2019-10-25 17:27:14 +02:00
Benno Schulenberg 4281b6becb commands: rename 'fixer' to 'formatter', to be less misleading
The word "fixer" sounds too much as if the command would be able
to fix mistakes or correct errors.  Especially when seen next to
"linter", it sounds as if one does a syntax check and the other
fixes the found mistakes.  (Although the command might in theory
be used for this, it is not its intended purpose.)
2019-10-25 17:24:28 +02:00
Benno Schulenberg 34b1824822 syntax: default: don't colorize stuff between two pairs of brackets
That is, don't allow another bracket between the opening and the
closing bracket.
2019-10-25 12:23:40 +02:00
Jeroen Roovers b025f67805 syntax: gentoo: highlight the BDEPEND variable as well
This fixes https://bugs.gentoo.org/698420.
Reported-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>

Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
2019-10-24 17:24:06 +02:00
Benno Schulenberg 40f8ca0d07 syntax: html: colorize only full attributes, and colorize strings later
Attribute names that are a part of another word should not be colored,
nor should attribute names within strings.

This addresses the other half of https://savannah.gnu.org/patch/?9865.
Original-patch-by: Ryan Westlund <rlwestlund@gmail.com>
2019-10-24 17:19:04 +02:00
Benno Schulenberg aae752912e syntax: javascript: colorize also special values 'null' and 'undefined'
This addresses one half of https://savannah.gnu.org/patch/?9865.
Original-patch-by: Ryan Westlund <rlwestlund@gmail.com>
2019-10-24 17:19:04 +02:00
Benno Schulenberg 3d5e51bcd0 syntax: nanorc: colorize in bright red everything that is invalid
Random words or mistyped keywords should not stay uncolored.
2019-10-20 14:47:15 +02:00
Benno Schulenberg 69d2045c9f syntax: nanorc: colorize only lowercase keywords as valid
Nowhere does the manual say that nanorc keywords are case-insensitive,
and none of the examples use uppercase keywords.  So, simply consider
uppercase keywords to be invalid.  This will later allow nano to use
case-sensitive comparisons, which are slightly faster.
2019-10-14 11:45:56 +02:00
Benno Schulenberg b8dc8d4a37 syntax: nanorc: colorize all arguments of 'fixer' and 'linter' as valid 2019-10-14 10:28:45 +02:00
Benno Schulenberg 8749ccb469 syntax: nanorc: colorize the 'fixer' command as valid
Also add a default formatting command to the Go syntax.
2019-10-14 10:28:45 +02:00
Benno Schulenberg f813fd0f4d rcfile: allow binding also F17...F24
For historical reasons the rebinding code allows binding F13...F16,
which on most terminals are typable with Shift plus F1...F4.  But,
at least on an Xfce Terminal, Shift plus F1...F12 produce F13...F24.
On a Linux console, Shift plus F1...F8 produce F13...F20.  So: allow
to bind the full shifted F13...F24 range.  It costs no extra code
and makes things more rounded.
2019-10-07 16:23:40 +02:00
Benno Schulenberg 2698a2ba68 syntax: c: recognize some C++ header files by their Emacs modeline
For extensionless files, recognize C/C++ ones from the mode name
between the -*- marks on the first line.

This addresses https://savannah.gnu.org/patch/?9719.

Inspired-by: Devin Hussey <husseydevin@gmail.com>
2019-10-06 12:01:02 +02:00
Benno Schulenberg 108a3b0b41 tweaks: sort two keywords strictly alphabetically 2019-09-29 15:11:15 +02:00
Dirkjan Ochtman e9d6ceab0b syntax: rust: add the words reserved in 2018, and remove unreserved ones
See https://doc.rust-lang.org/reference/keywords.html,
and https://rust-lang.github.io/rfcs/2421-unreservations-2018.html.

Signed-off-by: Dirkjan Ochtman <dirkjan@ochtman.nl>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2019-09-28 13:29:23 +02:00
Benno Schulenberg 3644d51b97 new feature: a 'tabgives' command to define what the Tab key produces
The 'tabgives' command is syntax-specific and should be followed by a
string containing the character(s) that a single press of the <Tab> key
should produce -- most likely a single TAB or a small bunch of spaces,
but any string is allowed.  This overrides the 'tabstospaces' option.

When one wants to make sure <Tab> inserts always four spaces and never
a TAB when editing a Python file, one could add to one's nanorc:

  extendsyntax python tabgives "    "

where there are four spaces between the quotes.  And when one wants
to ensure, when editing a Makefile, that <Tab> always inserts a TAB
and never spaces, independent of what tabstospaces is set to, one
could add to one's nanorc:

  extendsyntax makefile tabgives "	"

where there is a literal TAB character between the quotes.

This fulfills https://savannah.gnu.org/bugs/?53661,
Requested-by: Andrew Pennebaker <andrew.pennebaker@gmail.com>
And addresses https://savannah.gnu.org/bugs/?54760.
Requested-by: Henry van Megen <hvanmegen@gmail.com>
And addresses part of https://savannah.gnu.org/bugs/?54775.
Requested-by: Dirkjan Ochtman <dirkjan@ochtman.nl>
2019-09-25 19:35:07 +02:00
Benno Schulenberg bdf1a9d4e7 syntax: perl: avoid upsetting older glibcs with crafty range expression
The regcomp() function from glibc-2.27 (and older) considers the
bracket expression ['-.] to be invalid -- mistakenly.  Avoid using
any range expression in the relevant regex and instead enumerate
all acceptable characters.

This avoids https://savannah.gnu.org/bugs/?56766.
2019-08-19 17:15:29 +02:00
Benno Schulenberg f2f367ba9c syntaxes: change some unneeded 'icolor' commands to 'color' commands 2019-08-17 17:01:19 +02:00
Benno Schulenberg cd274a7830 syntax: perl: don't color the character after a variable name
And generally improve the regex for coloring Perl variable names.

This fixes https://savannah.gnu.org/bugs/?56713.
With-help-from: Brand Huntsman <alpha@qzx.com>

Bug existed since the Perl syntax was introduced,
in version 1.2.2, commit 70047eef.
2019-08-14 09:24:32 +02:00
Benno Schulenberg f773fa3968 syntax: default: colorize bracketed section headers in some config files 2019-08-14 09:18:51 +02:00
Benno Schulenberg 288355686b syntax: c: allow an underscore in lowercase type names 2019-08-11 20:06:46 +02:00
Benno Schulenberg ee91c51e09 syntax: perl: avoid recognizing embedded hash signs as a comment starter
Require that a comment starts at the start of a line or is preceded by
whitespace.  This prevents most hash signs used for other purposes (and
what follows them) getting colored as comments.
2019-08-08 12:08:34 +02:00
Benno Schulenberg 1e3f3a7511 syntaxes: recognize .ctp extension as a PHP file, and .cu as a C/C++ file
This brings color to CakePHP template files, and to CUDA files.

This addresses https://bugs.debian.org/932192.
Requested-by: Jérôme Bardot <bardot.jerome@gmail.com>
2019-08-08 12:02:07 +02:00
Benno Schulenberg 3b8847f319 syntax: po: colorize numbers only when they form a self-contained word 2019-07-29 19:12:58 +02:00
Benno Schulenberg 8f1cd50f1e syntax: python: avoid miscoloring stuff between two empty strings
The quotes of an empty string ('' or "") should be colored just like
those of a non-empty string, because otherwise the text *between* two
empty strings on the same line gets colored.

Add an extra rule to discolor triple quotes again to not make them
look like valid by themselves.

Also, remove six superfluous backslashes.

This addresses https://savannah.gnu.org/patch/?9801.
Reported-by: Ryan Westlund <rlwestlund@gmail.com>
2019-05-11 19:05:45 +02:00
Benno Schulenberg dfe87540c6 syntax: po: colorize also escaped hex and octal codes 2019-05-03 12:12:44 +02:00
Liu Hao c9605e7308 syntax: c: change the highlighting of preprocessor directives
Some of these directives are now colored in their entirety, while for
a few others it's still just the keyword itself that is colored.

Signed-off-by: Liu Hao <lh_mouse@126.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2019-04-06 17:51:07 +02:00
Benno Schulenberg 5375403b9d syntax: nanorc: colorize also strings preceded by 'start=' or 'end=' 2019-04-02 12:01:56 +02:00
Benno Schulenberg f8e0320722 syntax: nanorc: require whitespace both before and after a quoted string
This ensures that the keyname M-" is not miscolored.
2019-04-01 17:24:19 +02:00
Benno Schulenberg 85804ec70d syntax: man: require the dot to be at start of line, not the comment 2019-03-31 12:42:53 +02:00
Benno Schulenberg e473ba5e6c syntax: man: anchor macros at start of line, as only then they are valid 2019-03-30 20:54:31 +01:00
Benno Schulenberg 9120a62cdd syntax: man: add comments, and color all the safe lowercase macros 2019-03-30 20:47:45 +01:00
Benno Schulenberg 53ecb3225f syntax: default: color in red also versions 4.x of nano 2019-03-30 19:54:58 +01:00
Benno Schulenberg 92cbc7c426 syntax: c: color as a type any lowercase word that ends with "_t" 2019-03-30 17:48:34 +01:00
Benno Schulenberg 9ad3a17954 syntax: nanorc: stop coloring 'unset fill ...' as if it were valid
The same for 'unset tabsize ...'.

Also, color 'set guidestripe' plus a following number as valid.
2019-03-09 09:27:08 +01:00
Benno Schulenberg 916b4d81d0 rcfile: add 'stripecolor' for changing the color of the guiding stripe
The default is now simply reverse video, which works better than a
"loud" colored bar in an interface that for the rest is monochrome.
2019-03-09 09:27:08 +01:00
Benno Schulenberg 4d40bea58a rcfile: add the options that correspond to -b, -f, -j, and -e 2019-02-18 09:34:18 +01:00
Benno Schulenberg 670dd9bbe0 tweaks: condense two regexes in the Tcl syntax, and add a comment
Also, make a range of characters more explicit.
2018-12-17 16:00:54 +01:00
Benno Schulenberg 9cdc64c97a syntax: tcl: colorize comments normally, not with a background hue
This makes for a less "messy" and more readable appearance.

Suggested-by: Michael Siegel <msi@malbolge.net>
2018-12-17 15:35:56 +01:00