nano/syntax
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
..
Makefile.am help: use a dedicated syntax to color shortcuts in a help text 2017-04-25 17:21:46 +02:00
asm.nanorc syntaxes: change some unneeded 'icolor' commands to 'color' commands 2019-08-17 17:01:19 +02:00
autoconf.nanorc tweaks: slightly indent warnings and errors during the configure phase 2018-12-16 14:41:31 +01:00
awk.nanorc syntaxes: change some unneeded 'icolor' commands to 'color' commands 2019-08-17 17:01:19 +02:00
c.nanorc syntax: c: allow an underscore in lowercase type names 2019-08-11 20:06:46 +02:00
changelog.nanorc syntaxes: remove several redundant end-of-line anchors from regexes 2018-11-03 21:12:44 +01:00
cmake.nanorc syntaxes: change some unneeded 'icolor' commands to 'color' commands 2019-08-17 17:01:19 +02:00
css.nanorc syntaxes: remove quotes from each syntax name, and color it differently 2018-02-14 17:36:50 +01:00
debian.nanorc syntaxes: condense and/or correct some extension regexes 2018-05-18 20:40:08 +02:00
default.nanorc syntax: default: colorize bracketed section headers in some config files 2019-08-14 09:18:51 +02:00
elisp.nanorc syntaxes: remove several redundant end-of-line anchors from regexes 2018-11-03 21:12:44 +01:00
fortran.nanorc syntaxes: change some unneeded 'icolor' commands to 'color' commands 2019-08-17 17:01:19 +02:00
gentoo.nanorc syntaxes: remove several redundant end-of-line anchors from regexes 2018-11-03 21:12:44 +01:00
go.nanorc syntaxes: remove all traces of the 'formatter' command 2018-08-09 21:12:10 +02:00
groff.nanorc syntaxes: remove several redundant end-of-line anchors from regexes 2018-11-03 21:12:44 +01:00
guile.nanorc syntaxes: remove several redundant end-of-line anchors from regexes 2018-11-03 21:12:44 +01:00
html.nanorc syntaxes: remove quotes from each syntax name, and color it differently 2018-02-14 17:36:50 +01:00
java.nanorc syntaxes: remove quotes from each syntax name, and color it differently 2018-02-14 17:36:50 +01:00
javascript.nanorc syntaxes: remove quotes from each syntax name, and color it differently 2018-02-14 17:36:50 +01:00
json.nanorc syntaxes: remove several redundant end-of-line anchors from regexes 2018-11-03 21:12:44 +01:00
lua.nanorc syntaxes: change some unneeded 'icolor' commands to 'color' commands 2019-08-17 17:01:19 +02:00
makefile.nanorc syntax: makefile: color all keywords that GNU make recognizes 2018-05-30 11:29:08 +02:00
man.nanorc syntax: man: require the dot to be at start of line, not the comment 2019-03-31 12:42:53 +02:00
mgp.nanorc syntaxes: change some unneeded 'icolor' commands to 'color' commands 2019-08-17 17:01:19 +02:00
mutt.nanorc syntaxes: remove quotes from each syntax name, and color it differently 2018-02-14 17:36:50 +01:00
nanohelp.nanorc tweaks: renumber a couple of symbols, and reshuffle a bit of code 2018-11-07 19:30:04 +01:00
nanorc.nanorc new feature: a 'tabgives' command to define what the Tab key produces 2019-09-25 19:35:07 +02:00
nftables.nanorc syntaxes: remove several redundant end-of-line anchors from regexes 2018-11-03 21:12:44 +01:00
objc.nanorc tweaks: snip trailing whitespace that ended with a non-breaking space 2018-11-03 20:41:42 +01:00
ocaml.nanorc syntaxes: remove quotes from each syntax name, and color it differently 2018-02-14 17:36:50 +01:00
patch.nanorc syntaxes: remove quotes from each syntax name, and color it differently 2018-02-14 17:36:50 +01:00
perl.nanorc syntax: perl: avoid upsetting older glibcs with crafty range expression 2019-08-19 17:15:29 +02:00
php.nanorc syntaxes: recognize .ctp extension as a PHP file, and .cu as a C/C++ file 2019-08-08 12:02:07 +02:00
po.nanorc syntax: po: colorize numbers only when they form a self-contained word 2019-07-29 19:12:58 +02:00
postgresql.nanorc tweaks: fold a few pairs of regexes into each other 2018-11-03 21:32:07 +01:00
pov.nanorc syntaxes: remove quotes from each syntax name, and color it differently 2018-02-14 17:36:50 +01:00
python.nanorc syntaxes: change some unneeded 'icolor' commands to 'color' commands 2019-08-17 17:01:19 +02:00
ruby.nanorc syntaxes: change some unneeded 'icolor' commands to 'color' commands 2019-08-17 17:01:19 +02:00
rust.nanorc syntaxes: condense and/or correct some extension regexes 2018-05-18 20:40:08 +02:00
sh.nanorc syntaxes: remove several redundant end-of-line anchors from regexes 2018-11-03 21:12:44 +01:00
spec.nanorc syntaxes: remove several redundant end-of-line anchors from regexes 2018-11-03 21:12:44 +01:00
tcl.nanorc tweaks: condense two regexes in the Tcl syntax, and add a comment 2018-12-17 16:00:54 +01:00
tex.nanorc syntaxes: change some unneeded 'icolor' commands to 'color' commands 2019-08-17 17:01:19 +02:00
texinfo.nanorc syntaxes: remove several redundant end-of-line anchors from regexes 2018-11-03 21:12:44 +01:00
xml.nanorc syntaxes: remove quotes from each syntax name, and color it differently 2018-02-14 17:36:50 +01:00