Compare commits
396 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac1508c49e | ||
|
|
0de8d0d63d | ||
|
|
ff36b05cdb | ||
|
|
82a411077a | ||
|
|
cbc6e5197f | ||
|
|
de8dbf5a21 | ||
|
|
4f3fe133b8 | ||
|
|
f470c900ae | ||
|
|
8c5f504c75 | ||
|
|
ac193ec774 | ||
|
|
48223593de | ||
|
|
62de330358 | ||
|
|
9b084b2a1d | ||
|
|
ff6b92cfdd | ||
|
|
a2d74f7e5e | ||
|
|
ec173226cf | ||
|
|
d0e234db08 | ||
|
|
cfa297622b | ||
|
|
0606c62542 | ||
|
|
af26551762 | ||
|
|
5a39339478 | ||
|
|
769e81c7c3 | ||
|
|
0d5e732793 | ||
|
|
022d32a647 | ||
|
|
c3c2c66697 | ||
|
|
5a86c522bb | ||
|
|
353dd21588 | ||
|
|
f5ac8c1ee1 | ||
|
|
0ae38b4ef8 | ||
|
|
b19524f0d7 | ||
|
|
eb5c49d5bc | ||
|
|
8491c2251b | ||
|
|
277701f530 | ||
|
|
3be5f461f7 | ||
|
|
c7b0e54690 | ||
|
|
9af4751dcb | ||
|
|
fe9da9425e | ||
|
|
1028d65aa9 | ||
|
|
3edcfd283b | ||
|
|
52e3533e99 | ||
|
|
5298d5114c | ||
|
|
275bd28d3e | ||
|
|
6081546161 | ||
|
|
4774ca645f | ||
|
|
eb91ad54ef | ||
|
|
c5a2145b5a | ||
|
|
275b617705 | ||
|
|
230bd0d1df | ||
|
|
4e5af833ad | ||
|
|
e81a43fac4 | ||
|
|
5edd0411d6 | ||
|
|
f304622af8 | ||
|
|
f9375267c7 | ||
|
|
ee4e67aa1f | ||
|
|
f215603a10 | ||
|
|
ef2cbb7f35 | ||
|
|
dfc9a7edd8 | ||
|
|
044e4d2ae0 | ||
|
|
d1238c02d3 | ||
|
|
32187716f7 | ||
|
|
745410336b | ||
|
|
71c9a5245a | ||
|
|
678b221c36 | ||
|
|
24bc59f5c2 | ||
|
|
2088bfd45d | ||
|
|
7bc7acf3a2 | ||
|
|
8fd2c9a299 | ||
|
|
111071af05 | ||
|
|
127ce15d6b | ||
|
|
6a007a92c9 | ||
|
|
d2f3f2194e | ||
|
|
4e62842f82 | ||
|
|
d17b4804ec | ||
|
|
1d5134d93e | ||
|
|
cf4f80da9a | ||
|
|
8e01293b34 | ||
|
|
d2892ad396 | ||
|
|
07f14de995 | ||
|
|
1d19e011c3 | ||
|
|
85c2c2a5d2 | ||
|
|
61523be8d2 | ||
|
|
a225841753 | ||
|
|
e7d6e55332 | ||
|
|
77afd32e68 | ||
|
|
a6804b5f08 | ||
|
|
387b20969d | ||
|
|
d16f9af022 | ||
|
|
59cd3e682b | ||
|
|
a152311cb5 | ||
|
|
c1c67d8a14 | ||
|
|
aa9b1eeeaa | ||
|
|
22a0442e4a | ||
|
|
763f314ff2 | ||
|
|
38cb8acbf2 | ||
|
|
c1005fa125 | ||
|
|
f8507bb9a1 | ||
|
|
dcb0557670 | ||
|
|
abaaf2df1e | ||
|
|
0846583a2c | ||
|
|
8056390fff | ||
|
|
693e2aaf6c | ||
|
|
c970035001 | ||
|
|
0c3ced0d00 | ||
|
|
794956f7e0 | ||
|
|
be3e302a76 | ||
|
|
672821cb68 | ||
|
|
523598a342 | ||
|
|
436cd349b4 | ||
|
|
1663994e42 | ||
|
|
7a9f4a456e | ||
|
|
6371612508 | ||
|
|
5f655da048 | ||
|
|
4da2434dd7 | ||
|
|
61758e95ea | ||
|
|
c269d31854 | ||
|
|
43019189ca | ||
|
|
20011f4d41 | ||
|
|
618051cac7 | ||
|
|
301c4ef6b3 | ||
|
|
11d76449d2 | ||
|
|
20b1e92857 | ||
|
|
67e1387f04 | ||
|
|
00db994afe | ||
|
|
9df767288c | ||
|
|
86b8686010 | ||
|
|
b991403ce9 | ||
|
|
25e5896219 | ||
|
|
051c9ba418 | ||
|
|
cb7d11b3cf | ||
|
|
9c0f9de7c5 | ||
|
|
47be8c2fd8 | ||
|
|
c40cf0ad90 | ||
|
|
c8b60cec00 | ||
|
|
9aebd27d19 | ||
|
|
9fc713b4f1 | ||
|
|
12da94c9b2 | ||
|
|
e15abc9c1e | ||
|
|
94b1d01bb4 | ||
|
|
ac9973658a | ||
|
|
d630880802 | ||
|
|
75ff3a9587 | ||
|
|
27a52a8def | ||
|
|
24d9f3121e | ||
|
|
8c5b9e79cd | ||
|
|
3064db26e6 | ||
|
|
57d773f8d0 | ||
|
|
bb8c9031a4 | ||
|
|
e0149c1d9a | ||
|
|
374f4e2e64 | ||
|
|
f6a3ab0cd0 | ||
|
|
5df7c0dea5 | ||
|
|
e167afe14d | ||
|
|
4c9573dd91 | ||
|
|
bf6a9000d5 | ||
|
|
0d84301da3 | ||
|
|
5c2b44a48a | ||
|
|
623b1b6b0b | ||
|
|
fdec2a1d2d | ||
|
|
d6ecb969ae | ||
|
|
5bd359dbb9 | ||
|
|
d0691d9485 | ||
|
|
f876ee10c5 | ||
|
|
4b5fa615ca | ||
|
|
ff8454a6f5 | ||
|
|
cd634e074c | ||
|
|
1e3f6bc00b | ||
|
|
8f6151198a | ||
|
|
7828a8096e | ||
|
|
c8fbc7d1a1 | ||
|
|
9cc64380e5 | ||
|
|
eea0908236 | ||
|
|
b988132343 | ||
|
|
5c7a6d7dd5 | ||
|
|
8347d02b28 | ||
|
|
f803ef5aea | ||
|
|
7b4faba8ef | ||
|
|
ade84e6fa1 | ||
|
|
1f934e3a8b | ||
|
|
cc054ec00e | ||
|
|
753d93dcf6 | ||
|
|
e1f46a988a | ||
|
|
db7064b8e6 | ||
|
|
d19be5aafa | ||
|
|
598c654294 | ||
|
|
de597bce92 | ||
|
|
d0dec31778 | ||
|
|
91c740ed3b | ||
|
|
5e901c41e8 | ||
|
|
f7c5eeed2d | ||
|
|
2cdaaacb19 | ||
|
|
7f40bdfc15 | ||
|
|
2f00c9da83 | ||
|
|
6f6ee844c7 | ||
|
|
86f4384b91 | ||
|
|
d58fb902f4 | ||
|
|
a2dcd6edce | ||
|
|
bc6e9aa926 | ||
|
|
2ff9dc7090 | ||
|
|
e6821736aa | ||
|
|
ef97655753 | ||
|
|
24ed1bb576 | ||
|
|
70b2d08610 | ||
|
|
2d83e8d41f | ||
|
|
fc55756378 | ||
|
|
189fff44dc | ||
|
|
b115aab586 | ||
|
|
96c95cd6a1 | ||
|
|
062bca7c41 | ||
|
|
8611e4785f | ||
|
|
36c87bcfd5 | ||
|
|
81377d9656 | ||
|
|
26fd9b29a3 | ||
|
|
1db6de4c25 | ||
|
|
46b07fad74 | ||
|
|
9901170750 | ||
|
|
817707eec7 | ||
|
|
00389928d4 | ||
|
|
61bba1de8e | ||
|
|
7a254dd1fe | ||
|
|
d8bf887f2c | ||
|
|
f14096e286 | ||
|
|
b8b29ff138 | ||
|
|
d17438bd1d | ||
|
|
0636d7b797 | ||
|
|
9d306cd330 | ||
|
|
4d570e5c1b | ||
|
|
5ead22ddf5 | ||
|
|
a4c0c2f6ec | ||
|
|
7cf7f42546 | ||
|
|
73ff00e47f | ||
|
|
b29ea107b6 | ||
|
|
4171477fb5 | ||
|
|
d28ed53db1 | ||
|
|
7a8bd82af5 | ||
|
|
055f0fbbe4 | ||
|
|
211a5e4c4d | ||
|
|
1265e4ae5d | ||
|
|
619b216b62 | ||
|
|
682c1d0d84 | ||
|
|
38142830c7 | ||
|
|
b21daeb009 | ||
|
|
0e39d7fe4a | ||
|
|
e9a440f45f | ||
|
|
803c478e88 | ||
|
|
91ee10a3f9 | ||
|
|
cf71578cfd | ||
|
|
c55ac2bb4d | ||
|
|
463db0dbcc | ||
|
|
55543ad42f | ||
|
|
bb06fae403 | ||
|
|
a997aa6d58 | ||
|
|
a166f702a0 | ||
|
|
f7b5c5a685 | ||
|
|
804b94e8f7 | ||
|
|
a85b6da60d | ||
|
|
70d2167b4b | ||
|
|
90ea21f870 | ||
|
|
18530ece9d | ||
|
|
673d210e43 | ||
|
|
499c6de227 | ||
|
|
18c252d5e7 | ||
|
|
eaff14f320 | ||
|
|
4172714415 | ||
|
|
55a0d76c66 | ||
|
|
3de6c5798b | ||
|
|
2797521289 | ||
|
|
a2fcc06fa5 | ||
|
|
b2a47a1090 | ||
|
|
52402756b0 | ||
|
|
1701ade046 | ||
|
|
5572ab92af | ||
|
|
c7acf170d5 | ||
|
|
117cf85fac | ||
|
|
d398d92552 | ||
|
|
42e75823b8 | ||
|
|
0b2f84322a | ||
|
|
cc7fef723d | ||
|
|
cb80ca51b4 | ||
|
|
05126fd1bf | ||
|
|
e51cfa32f6 | ||
|
|
eec71e31a0 | ||
|
|
90a43c3c27 | ||
|
|
960a120468 | ||
|
|
a65ef4244c | ||
|
|
88ff6a7f3d | ||
|
|
5ac8651729 | ||
|
|
e4c34c3386 | ||
|
|
a8353bdfff | ||
|
|
e34ac8e11d | ||
|
|
c3e4a1fadd | ||
|
|
8977c4b153 | ||
|
|
c85dc05965 | ||
|
|
3278f839c1 | ||
|
|
f7c68cd143 | ||
|
|
1a1b2a0c0f | ||
|
|
6ae7760ccc | ||
|
|
377a6e3dc7 | ||
|
|
d39de2404f | ||
|
|
3a5f55e439 | ||
|
|
c347ce44a3 | ||
|
|
6cd8314e76 | ||
|
|
37d638a02c | ||
|
|
54a11058ee | ||
|
|
b1a7fddc33 | ||
|
|
3ae5bab14e | ||
|
|
e52eac51f5 | ||
|
|
bc5c7c3b74 | ||
|
|
3aea69daae | ||
|
|
919c9bdbbb | ||
|
|
fe267f61d9 | ||
|
|
92ccf77f7f | ||
|
|
9a21761b24 | ||
|
|
46fccb2610 | ||
|
|
22a1440ce1 | ||
|
|
16fe178879 | ||
|
|
9c11ba9365 | ||
|
|
86fb8dd73c | ||
|
|
8e82d35670 | ||
|
|
8a2c245d2c | ||
|
|
b2b7c2f968 | ||
|
|
5d5e930aa9 | ||
|
|
c05a2ee3d7 | ||
|
|
cae7aea88d | ||
|
|
b3306b22f5 | ||
|
|
df7bba340f | ||
|
|
db906ea121 | ||
|
|
be5ab4e654 | ||
|
|
7f87393fa9 | ||
|
|
ccb02f7740 | ||
|
|
01a143474b | ||
|
|
fde9d4c189 | ||
|
|
ae092b90d8 | ||
|
|
4ab142c0aa | ||
|
|
64c00b5185 | ||
|
|
34b7f1c4f7 | ||
|
|
5575bfad2c | ||
|
|
1dd389e403 | ||
|
|
c4b344f733 | ||
|
|
183fa5ab20 | ||
|
|
e9ee078c10 | ||
|
|
4abf9449b4 | ||
|
|
c4520d57aa | ||
|
|
10a18c141b | ||
|
|
cf79e52526 | ||
|
|
724950701a | ||
|
|
d6e39724d8 | ||
|
|
44e8583a66 | ||
|
|
fb4e402411 | ||
|
|
b55ce29a48 | ||
|
|
6f517bccf0 | ||
|
|
c218415212 | ||
|
|
d2f29d0243 | ||
|
|
bac696a745 | ||
|
|
2ed673fb95 | ||
|
|
18b1092932 | ||
|
|
d1336f6c82 | ||
|
|
bf406ffc6f | ||
|
|
2e46cc11e5 | ||
|
|
f9e9464658 | ||
|
|
f2af9aa07a | ||
|
|
2d34586c43 | ||
|
|
6251358746 | ||
|
|
4cc4b9ba08 | ||
|
|
0438575c4c | ||
|
|
2b4e433687 | ||
|
|
22c83ec7af | ||
|
|
2072b74153 | ||
|
|
66e5972c52 | ||
|
|
a149549d07 | ||
|
|
67acf2c753 | ||
|
|
29479ca7f5 | ||
|
|
b7a2dfb2da | ||
|
|
f4e26d174e | ||
|
|
2e4228f78e | ||
|
|
a016f00f14 | ||
|
|
76d61ec167 | ||
|
|
2a76b434fc | ||
|
|
1642e6a368 | ||
|
|
3116d2f7de | ||
|
|
4cc2462ed4 | ||
|
|
170607b6c9 | ||
|
|
636e76af23 | ||
|
|
220247172a | ||
|
|
d70c7f3c14 | ||
|
|
21f73f902f | ||
|
|
bf88d27adc | ||
|
|
2ad1de0ba6 | ||
|
|
d84849ec12 | ||
|
|
8d7402f470 | ||
|
|
daeab0518d | ||
|
|
090e2cf726 | ||
|
|
7a707670d6 | ||
|
|
f9217437ad | ||
|
|
fda622c0cd | ||
|
|
bccf2fa1c9 | ||
|
|
34de1a6706 |
9
.gitignore
vendored
9
.gitignore
vendored
@@ -1,17 +1,24 @@
|
||||
*~
|
||||
*.bak
|
||||
*.o
|
||||
.deps
|
||||
.libs
|
||||
Makefile
|
||||
Makefile.in
|
||||
|
||||
core
|
||||
.gdb_history
|
||||
.gdbinit
|
||||
|
||||
/ABOUT-NLS
|
||||
/INSTALL
|
||||
/aclocal.m4
|
||||
/autom4te.cache
|
||||
/config.cache
|
||||
/config.guess
|
||||
/config.log
|
||||
/config.h
|
||||
/config.h.in
|
||||
/config.log
|
||||
/config.rpath
|
||||
/config.status
|
||||
/config.sub
|
||||
|
||||
2
AUTHORS
2
AUTHORS
@@ -4,7 +4,7 @@ nano editor. Please see the ChangeLog for specific changes by author.
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Chris Allegretta <chrisa@asty.org>
|
||||
* Original program author, former stable series maintainer.
|
||||
* Original program author, former and current maintainer.
|
||||
|
||||
David Lawrence Ramsey <pooka109@gmail.com>
|
||||
* Former stable series maintainer. Multiple buffer support,
|
||||
|
||||
279
NEWS
279
NEWS
@@ -1,59 +1,108 @@
|
||||
GNU nano 2.3.0 - 2011.02.26
|
||||
2014.06.02 - GNU nano 2.3.4 won't leave you high, won't leave you dry. This
|
||||
release contains only a small number of fixes, but in
|
||||
particular allows nano to compile on non-UTF8 curses
|
||||
implementations (i.e. libncursesw). Other small fixes to
|
||||
the undo implementation and the default syntax config are
|
||||
also included. As always, Share and Enjoy!
|
||||
|
||||
2014.05.28 - GNU nano 2.3.3 is in its right place. This release contains
|
||||
many many improvements to the core system, including
|
||||
substantial improvements to the undo/redo code, UTF-8
|
||||
handling, the configure script, and display of shortcuts
|
||||
on very wide terminals, New features include the
|
||||
ability to read named pipes (--noread), as well as
|
||||
linter support (see the nanorc man page for details). Also
|
||||
included are much improved syntax highlighting code, and
|
||||
configurations for JSON, texinfo, Go, and a default syntax
|
||||
for catch all highlighting. Finally, nano now has the
|
||||
ability to set the color of the title bar, status bar, and
|
||||
shortcut keys (e.g. "^X") and their descriptions. Again
|
||||
see the nanorc page for details. There's much more, too
|
||||
much to include here, but please keep those reports and
|
||||
general feedback coming! Thank you for helping us help
|
||||
you help us all.
|
||||
|
||||
2013.03.22 - GNU nano 2.3.2 "Annoy your coworkers for fun and profit" is
|
||||
released. This release introduces vim-style file locking
|
||||
(though not backup/restore), useful when using nano
|
||||
in a multi-editor environment. Feedback is welcome if
|
||||
you run into any issues with this new code. Other new
|
||||
features include additional support for word boundary
|
||||
checking when cross compiling, fixes for trying to go to
|
||||
an invalid line number, and the usual documentation
|
||||
tweaks.
|
||||
|
||||
2011.05.10 - GNU nano 2.3.1 "I'm in space" is released. This
|
||||
release includes some fixes for the new libmagic code, as
|
||||
well as a fix for improper character counts when using
|
||||
auto-indent. Also included are new syntax highlighting
|
||||
definitions for RPM spec and lua files. Thanks for
|
||||
using nano and keep circulating the tapes.
|
||||
|
||||
2011.02.26 - GNU nano 2.3.0 "Septic surprise" is released. This first
|
||||
release in the 2.3 unstable series bring several new
|
||||
release in the 2.3 unstable series brings several new
|
||||
features. First, libmagic support for syntax highlighting
|
||||
has been added on top of the existing file extension
|
||||
and header support already available. Secondly, cursor
|
||||
position can be saved between editing sessions with
|
||||
the -P or --poslog command line flags, or via "set poslog"
|
||||
in your .nanorc. Also included are some fixes for
|
||||
compilation with g++, and better handling of issues
|
||||
writing the backup file, which should reduce the need
|
||||
for the 'set allow_insecure_backup" nanorc option.
|
||||
has been added on top of the existing file extension
|
||||
and header support already available. Secondly, cursor
|
||||
position can be saved between editing sessions with
|
||||
the -P or --poslog command-line flag, or via "set poslog"
|
||||
in your .nanorc. Also included are some fixes for
|
||||
compilation with g++, and better handling of issues
|
||||
writing the backup file, which should reduce the need
|
||||
for the 'set allow_insecure_backup" nanorc option.
|
||||
Don't stop, get it get it, don't stop, get it get it.
|
||||
|
||||
2010.11.22 - GNU nano 2.2.6 "Pimp my BBS" wants you to go to
|
||||
www.desertbus.org and donate a few bucks for the great
|
||||
Child's Play Charity! This is just a small release to
|
||||
update a bug where restricted mode was not particularly
|
||||
restricted since key bindings were introduced. It also
|
||||
signals the return of win32 builds which now feature
|
||||
nanorc support; please see the FAQ for details of how
|
||||
to enable it, this feature is a bit of a kludge for now.
|
||||
Remember that when all else fails, USE SPACE JUMP.
|
||||
|
||||
2010.08.05 - GNU nano 2.2.5 "Inactivity timeout" is now available.
|
||||
This release includes slightly less restrictive checkng
|
||||
when writing files in strange environments (e.g.
|
||||
when being used out of crontab). For very strange situations
|
||||
This release includes slightly less restrictive checking
|
||||
when writing files in strange environments (e.g. when
|
||||
being used out of crontab). For very strange situations
|
||||
(such as where you cannot change the permissions on the
|
||||
file you're writing, there is a new rc file option
|
||||
file you're writing), there is a new rc file option
|
||||
"allow_insecure_backup" to be even more permissive and
|
||||
allowing the write to proceed. Also included are
|
||||
some syntax highlighting updated, and that is about it.
|
||||
allow the write to proceed. Also included are some
|
||||
syntax highlighting updates, and that is about it.
|
||||
Keep fighting the good fight children.
|
||||
|
||||
2010.04.15 - GNU nano 2.2.4 is nobody's fool. First and foremost,
|
||||
this relase includes some security fixes due to
|
||||
this release includes some security fixes due to
|
||||
an assessment of nano's vulnerability to symlink attacks
|
||||
on open files. The CVEs fixed with this release are
|
||||
CVE-2010-1160 and CVE-2010-1161. Also included are fixes
|
||||
for various crash modes when using the spell checker
|
||||
on new files in multibuffer mode (surely you've used
|
||||
that combination recently? No?) as well as a fixing
|
||||
the 'file was modified' message when saving to a
|
||||
that combination recently? no?) as well as a fixing
|
||||
the 'file was modified' message when saving to a
|
||||
new filename (since how would nano know?). And
|
||||
the list would not be complete without our
|
||||
the list would not be complete without our
|
||||
third-times-the-charm fixes to page up/down due to
|
||||
the soft wrapping code. The lone new feature
|
||||
included is a new syntax higlighting definition for
|
||||
the soft wrapping code. The lone new feature
|
||||
included is a new syntax highlighting definition for
|
||||
cmake-related files. Please do consider upgrading to
|
||||
this release if still using the 2.0 series since
|
||||
fixes for that version are still forthcoming.
|
||||
|
||||
|
||||
2010.02.11 - GNU nano 2.2.3 "fumbling toward stability" is released.
|
||||
This release contains a fix for only one bug, but a
|
||||
rather irritating one: when paging up/down with smooth
|
||||
scrolling, the cursor position was not being preserved
|
||||
due to a bug in 2.2.2. With such a targeted fix
|
||||
This release contains a fix for only one bug, but a
|
||||
rather irritating one: when paging up/down with smooth
|
||||
scrolling, the cursor position was not being preserved
|
||||
due to a bug in 2.2.2. With such a targeted fix
|
||||
like this what could POSSIBLY go WRONG? Hahaha.
|
||||
Enjoy and if you find new bugs, as always please
|
||||
use Savannah's bug tracker.
|
||||
http://savannah.gnu.org/bugs/?func=additem&group=nano
|
||||
|
||||
2010.01.17 - GNU nano 2.2.2 is released for you, you, you. This
|
||||
release includes fixes for: crashed when writing
|
||||
release includes fixes for: crashes when writing
|
||||
backup files in certain conditions, improper
|
||||
screen centering when moving up/down in various
|
||||
combination of smooth scrolling and soft wrapping modes,
|
||||
@@ -66,19 +115,18 @@ GNU nano 2.3.0 - 2011.02.26
|
||||
|
||||
2009.12.12 - GNU nano 2.2.1 "DLR strikes back" is open for business.
|
||||
This release fixes many bugs, including: missing
|
||||
keybindings for page up/down and GotoDir in the browser,
|
||||
^P/^N in the help menu, and restoration of M-W as the
|
||||
keybindings for page up/down and GotoDir in the browser,
|
||||
^P/^N in the help menu, and restoration of M-W as the
|
||||
default re-search binding. Other fixes include several
|
||||
issues with compiler warnings and configure options, and
|
||||
documentation updates, including the nano texinfo manual,
|
||||
issues with compiler warnings and configure options, and
|
||||
documentation updates, including the nano texinfo manual,
|
||||
nano and nanorc man pages, and UPGRADE file, and some
|
||||
missing syntax highliting entries for the saple nanorc.
|
||||
missing syntax highliting entries for the sample nanorc.
|
||||
And no release would be complete without the latest round
|
||||
of 'final' soft wrapping fixes! Finally, nano will no
|
||||
longer print a warning when attempting to insert the
|
||||
contents of a read-only file into an existing buffer.
|
||||
of 'final' soft wrapping fixes! Finally, nano will no
|
||||
longer print a warning when attempting to insert the
|
||||
contents of a read-only file into an existing buffer.
|
||||
Enjoy and Happy Hanukkah.
|
||||
|
||||
|
||||
2009.11.30 - GNU nano 2.2.0 "Doc Brown" is released! The culmination
|
||||
of almost two years of development and hot on the heels
|
||||
@@ -87,54 +135,54 @@ GNU nano 2.3.0 - 2011.02.26
|
||||
include several fixes for tiny mode (involving both
|
||||
the help keys and replace menu text), more 'final'
|
||||
fixes for soft wrapping, and several typo and documentation
|
||||
updates including nanorc tweaks and a new syntax
|
||||
updates including nanorc tweaks and a new syntax
|
||||
highlighting file for makefiles. Also included is a long
|
||||
standing fix for random crashing when using nanorc on
|
||||
FreeBSD, and nano will no longer clear the screen on
|
||||
suspend to maintain compatibility with other *nix editors.
|
||||
For those who haven't been playing along at home, please
|
||||
see the official web page for the summary of new
|
||||
features since 2.0. Special thanks to all who have
|
||||
submitted bug reports recently in support of our new
|
||||
stable release, and apologies for all those bugs we
|
||||
features since 2.0. Special thanks to all who have
|
||||
submitted bug reports recently in support of our new
|
||||
stable release, and apologies for all those bugs we
|
||||
didn't yet find :-) Peace to all.
|
||||
|
||||
2009.11.21 - GNU nano 2.1.99pre2 is available for a special pre-Black
|
||||
Friday discount. Included are some (hopefully
|
||||
final) fixes for issues with last page display
|
||||
caused by the soft wrapping code, and a fix for
|
||||
a long standing issue with hittig the home key when
|
||||
a long standing issue with hittig the home key when
|
||||
going through the search history. On the features
|
||||
front, nano will now attempt to retain the proper
|
||||
ownership and permissions when trying to create a
|
||||
.save file due to receiving a signal. Nano can also
|
||||
now unbind keys from one or more menus via the 'unbind'
|
||||
keyword. Finally, passing --fill or --nowrap on
|
||||
the command line will now override any related
|
||||
.nanorc entries. Speak now or forever hold your bugs!
|
||||
front, nano will now attempt to retain the proper
|
||||
ownership and permissions when trying to create a
|
||||
.save file due to receiving a signal. Nano can also
|
||||
now unbind keys from one or more menus via the 'unbind'
|
||||
keyword. Finally, passing --fill or --nowrap on
|
||||
the command line will now override any related
|
||||
.nanorc entries. Speak now or forever hold your bugs!
|
||||
|
||||
2009.11.15 - GNU nano 2.1.99pre1 "take a bow" is out there, man, it's
|
||||
out there all right. This release contains mainly
|
||||
bugfixes, underscoring that we are preparing for the
|
||||
next stable series release. Included are many fixes
|
||||
for the new soft wrapping code, compiler warning tweaks,
|
||||
and the modification time warning no longer triggers
|
||||
when saving a file as a new name. Also include are
|
||||
some fixes for various nanorc options, and there are
|
||||
surely more bugs to find before we call the code base
|
||||
out there all right. This release contains mainly
|
||||
bugfixes, underscoring that we are preparing for the
|
||||
next stable series release. Included are many fixes
|
||||
for the new soft wrapping code, compiler warning tweaks,
|
||||
and the modification time warning no longer triggers
|
||||
when saving a file as a new name. Also include are
|
||||
some fixes for various nanorc options, and there are
|
||||
surely more bugs to find before we call the code base
|
||||
stable, so please keep those reports coming!
|
||||
|
||||
2009.09.14 - GNU nano 2.1.11 is on very thin ice, very thin ice, very thin
|
||||
ice. This release includes two new features: first, nano
|
||||
will check whether the current file is writable when it
|
||||
is opened, and warn if it is not on the status bar. Secondly,
|
||||
a new soft-wrapping (AKA full line display) option is
|
||||
a new soft-wrapping (AKA full line display) option is
|
||||
available, which will attempt to fully display the contents
|
||||
of lines longer than the width of the screen without the
|
||||
usual truncation and a '$' symbol at the end of the line.
|
||||
It can be enabled via Meta-$ inside the editor, via the
|
||||
-$ or --softwrap command line flags, or "set softwrap"
|
||||
in your .nanorc). As always please report any bugs to the
|
||||
It can be enabled via Meta-$ inside the editor, via the
|
||||
-$ or --softwrap command line flags, or "set softwrap"
|
||||
in your .nanorc). As always please report any bugs to the
|
||||
nano Savannah project page
|
||||
(http://savannah.gnu.org/bugs/?func=additem&group=nano)
|
||||
Remember: data loss happens, back up your files.
|
||||
@@ -144,76 +192,75 @@ GNU nano 2.3.0 - 2011.02.26
|
||||
compiler combos, various compiler warnings, and some crash
|
||||
fixes in the undo code. On the topic of the latter item,
|
||||
the undo code is now marked as experimental since it can
|
||||
cause severe stability and memory issues, and thus now
|
||||
requires a flag (-u, --undo) in order to enable it.
|
||||
Please feel free to continue to test the undo code and
|
||||
cause severe stability and memory issues, and thus now
|
||||
requires a flag (-u, --undo) in order to enable it.
|
||||
Please feel free to continue to test the undo code and
|
||||
thanks again for using nano for your text editing needs.
|
||||
Go team Nano!
|
||||
|
||||
2009.02.16 - GNU nano 2.1.9 wonders what all that glass is doing on the
|
||||
floor! This release is primarily meant as a less buggy
|
||||
version of 2.1.8, particularly for issues with the new
|
||||
sped-up syntax highlighting code. Other fixes include
|
||||
configure-time detection of groff HTML support before
|
||||
attempting to generate the HTML version of man pages,
|
||||
and using ~ or ~username syntax in .nanorc should now
|
||||
work again. Also, nano will now only ask for one
|
||||
acknowledgement of errors it encounters when parsing
|
||||
nanorc files, and a new flag -q (--quiet) will silence
|
||||
these messages altogether. Give it a go, and happy
|
||||
floor! This release is primarily meant as a less buggy
|
||||
version of 2.1.8, particularly for issues with the new
|
||||
sped-up syntax highlighting code. Other fixes include
|
||||
configure-time detection of groff HTML support before
|
||||
attempting to generate the HTML version of man pages,
|
||||
and using ~ or ~username syntax in .nanorc should now
|
||||
work again. Also, nano will now only ask for one
|
||||
acknowledgement of errors it encounters when parsing
|
||||
nanorc files, and a new flag -q (--quiet) will silence
|
||||
these messages altogether. Give it a go, and happy
|
||||
birthday lenny!
|
||||
|
||||
2009.02.07 - GNU nano 2.1.8 "unsafe at any speed" is released. This
|
||||
release include some long overdue performance
|
||||
release include some long overdue performance
|
||||
improvements in syntax color highlighting, the ability
|
||||
to abort running searches (useful mainly when
|
||||
editing very large files) and the ability to use nano
|
||||
like a pager for viewing standard input (i.e. "nano -").
|
||||
Additionally, there are gentoo syntax highlighting
|
||||
updates and fixes for issues with reading files
|
||||
in a directory with strange parent directory permissions.
|
||||
The key bindings code was also substantially changed
|
||||
in order to be more ISO-C compatible. Be sure to use
|
||||
the Savannah page not only for bug reports but for any
|
||||
features you would like to see before the next stable
|
||||
Additionally, there are gentoo syntax highlighting
|
||||
updates and fixes for issues with reading files
|
||||
in a directory with strange parent directory permissions.
|
||||
The key bindings code was also substantially changed
|
||||
in order to be more ISO-C compatible. Be sure to use
|
||||
the Savannah page not only for bug reports but for any
|
||||
features you would like to see before the next stable
|
||||
series is released. Have fun with it!
|
||||
|
||||
|
||||
2008.11.10 - GNU nano 2.1.7 "Effingham" is ready to make good on those
|
||||
campaign promises of lower bug rates and 50% more pie.
|
||||
This release includes a new check for external
|
||||
modifications when saving a file, some code and
|
||||
documentation cleanups, and more bug fixes for
|
||||
modifications when saving a file, some code and
|
||||
documentation cleanups, and more bug fixes for
|
||||
the new undo code (but we continue to welcome your bug
|
||||
reports via the Savananh bug page at
|
||||
reports via the Savananh bug page at
|
||||
http://savannah.gnu.org/bugs/?func=additem&group=nano.
|
||||
Come get some.
|
||||
|
||||
2008.10.03 - GNU nano 2.1.6 was for new features before it was against
|
||||
them. This release includes more undo capability,
|
||||
them. This release includes more undo capability,
|
||||
several new syntax highlighting configurations including
|
||||
Objective C, OCaml, and Fortran, and a new capability
|
||||
to activate highlighting based on the 1st line of the
|
||||
file being edited. Also, the new default configure
|
||||
file being edited. Also, the new default configure
|
||||
options now include color syntax highlighting, .nanorc
|
||||
support, multibuffer and extras. These items can still
|
||||
be disabled and are not enabled with --enable-tiny. Bug
|
||||
fixes include better signal handling under Cygwin, and
|
||||
fixes include better signal handling under Cygwin, and
|
||||
that's about it. Again please remember to
|
||||
submit bug reports via Savannah at
|
||||
submit bug reports via Savannah at
|
||||
http://savannah.gnu.org/bugs/?func=additem&group=nano
|
||||
as undo functions certainly need more testing.
|
||||
as undo functions certainly need more testing.
|
||||
Bon appetit.
|
||||
|
||||
2008.08.30 - GNU nano 2.1.5 is ready to lead on day one. This release
|
||||
contains a better fix for incorrectly reported successful
|
||||
writes on full filesystems, more helpful messages when
|
||||
an internal error occurs in the undo code, and fixes for
|
||||
various combinations of configure-time options and
|
||||
compiler flags. Also included is new support for
|
||||
an internal error occurs in the undo code, and fixes for
|
||||
various combinations of configure-time options and
|
||||
compiler flags. Also included is new support for
|
||||
changing the rc file name at configure time, and
|
||||
using GNU-style regexes for word-boundaries on systems
|
||||
which do not support them natively, as well as the ever
|
||||
using GNU-style regexes for word-boundaries on systems
|
||||
which do not support them natively, as well as the ever
|
||||
popular translation updates. Rock the tarball.
|
||||
|
||||
2008.08.09 - GNU nano 2.1.4 "I told you so!" is released. This release
|
||||
@@ -226,42 +273,42 @@ GNU nano 2.3.0 - 2011.02.26
|
||||
are likely to run out of space; see Savannah bug 24000.
|
||||
Have fun with it!
|
||||
|
||||
2008.08.04 - GNY nano 2.1.3 "least stable version ever" is released. This
|
||||
2008.08.04 - GNU nano 2.1.3 "least stable version ever" is released. This
|
||||
release includes new (and experimental) undo and redo
|
||||
functionality for most text operations. The default
|
||||
functionality for most text operations. The default
|
||||
key bindings are Meta-U for undo and Meta-E for redo, but
|
||||
these can be remapped using the new 2.1 keybinding code.
|
||||
Also included are some fixes for configuring using wide
|
||||
curses, crashing when invoking the help menu with
|
||||
Also included are some fixes for configuring using wide
|
||||
curses, crashing when invoking the help menu with
|
||||
certain locales, and not saving the search history when
|
||||
compiled with configure options.
|
||||
|
||||
2008.04.24 - GNU nano 2.1.2 "New York City" is released. This release
|
||||
contains fixes for binding bad keys, some
|
||||
configure-specific compilation failures, and more issues
|
||||
with the new input back end and in particular the status
|
||||
bar. Also fixed are some long standing issues with
|
||||
contains fixes for binding bad keys, some
|
||||
configure-specific compilation failures, and more issues
|
||||
with the new input back end and in particular the status
|
||||
bar. Also fixed are some long standing issues with
|
||||
compiling on AIX, and a segfault when making the terminal
|
||||
window too small. Rest in Peace Tim and George!
|
||||
|
||||
2008.04.01 - GNU nano 2.1.1 wont get fooled again. This release contains
|
||||
fixes for the new user-rebindable keys (in particular
|
||||
bracket match which was mis-bound), and various
|
||||
problems with translations and configure-related
|
||||
problems with translations and configure-related
|
||||
compilation problems are now fixed as well.
|
||||
It also contains new syntax highlighting
|
||||
definitions for TCL, PHP, Gentoo and Debian-related
|
||||
files, and some documentation updates as well.
|
||||
Please continue to send reports with the key
|
||||
It also contains new syntax highlighting
|
||||
definitions for TCL, PHP, Gentoo and Debian-related
|
||||
files, and some documentation updates as well.
|
||||
Please continue to send reports with the key
|
||||
binding code to the Savannah page
|
||||
(https://savannah.gnu.org/bugs/?group=nano).
|
||||
|
||||
|
||||
2008.03.18 - GNU nano 2.1.0 "under old mismanagement" is released.
|
||||
This first release in the 2.1 development series
|
||||
introduces rebinadble keys for most actions inside
|
||||
the editor. Please see the nanorc(5) page for
|
||||
more information on configuring key bindings. Please
|
||||
also report all keybinding bugs (crashes, missing
|
||||
more information on configuring key bindings. Please
|
||||
also report all keybinding bugs (crashes, missing
|
||||
menu functions) using the Savannah bug tracker URL,
|
||||
https://savannah.gnu.org/bugs/?group=nano and
|
||||
thanks for sticking with us!
|
||||
@@ -739,10 +786,10 @@ GNU nano 2.3.0 - 2011.02.26
|
||||
new option to ignore rc files (-I,--ignorercfiles),
|
||||
compatibility with -pedantic, handling null characters
|
||||
before EOF, a slightly sportier nanorc.sample and more.
|
||||
Fixes are included included for justification,
|
||||
Fixes are included for justification,
|
||||
the reading and writing file routines, resizing and fill
|
||||
length, millions of memory leaks, the usage screen was
|
||||
updated, and the the --quotestr and --regexp really work
|
||||
updated, and the --quotestr and --regexp really work
|
||||
now ;-) Enjoy :)
|
||||
|
||||
05/12/2002 - GNU nano 1.1.9 is released, happy Mother's Day! This
|
||||
@@ -900,7 +947,7 @@ GNU nano 2.3.0 - 2011.02.26
|
||||
also features mutt's case insensitive string compare
|
||||
function for more speed and less memory usage. Two new
|
||||
translations are included, Ukrainian and Russian.
|
||||
|
||||
|
||||
05/12/2001 - GNU nano 1.0.2 is the "just the bugfixes ma'am" release.
|
||||
The most noticeable fixes are for display errors using
|
||||
page up/down with the marker code, and view mode (-v)
|
||||
@@ -1067,7 +1114,7 @@ GNU nano 2.3.0 - 2011.02.26
|
||||
|
||||
08/03/2000 - Nano 0.9.15 is the "I can't think of a release description"
|
||||
release. There are the usual gala of display bugfixes,
|
||||
a fix for the the nasty bug in -k mode that could create
|
||||
a fix for the nasty bug in -k mode that could create
|
||||
a loop in the file being edited, and some other code
|
||||
cleanup. Also, the -T option should now work regardless
|
||||
of the curses library used. Yay.
|
||||
|
||||
6
README
6
README
@@ -65,8 +65,8 @@ Mailing List and Bug Reports
|
||||
|
||||
Current Status
|
||||
|
||||
GNU nano has reached its third stable milestone, 2.0.x.
|
||||
Development of new features continues in the 2.1.x branch, while
|
||||
2.0.x versions are dedicated to bug-fixing and polishing.
|
||||
GNU nano has reached its fourth stable milestone, 2.2.x.
|
||||
Development of new features continues in the 2.3.x branch, while
|
||||
2.2.x versions are dedicated to bug-fixing and polishing.
|
||||
|
||||
$Id$
|
||||
|
||||
11
README.SVN
11
README.SVN
@@ -17,7 +17,6 @@ packages:
|
||||
- groff (version >= 1.12)
|
||||
- texinfo (version >= 4.0)
|
||||
- subversion (aka svn)
|
||||
- ssh (with support for the SSH version 2 protocol)
|
||||
- glib 2.x (if your system doesn't have vsnprintf(), which the configure
|
||||
script will check for)
|
||||
- make, gcc and the normal development libraries (curses or slang, etc.)
|
||||
@@ -30,15 +29,15 @@ to use UTF-8.
|
||||
Download the source
|
||||
-------------------
|
||||
|
||||
To obtain the current nano development code (called 'trunk'), use the
|
||||
following command. It will create a copy of the files in a subdirectory
|
||||
To obtain the current nano development code (called 'trunk'), use the
|
||||
following command. It will create a copy of the files in a subdirectory
|
||||
of your current working directory called 'nano':
|
||||
|
||||
$ svn co svn://svn.savannah.gnu.org/nano/trunk/nano
|
||||
|
||||
If you want to download the stable SVN branch instead, use:
|
||||
|
||||
$ svn co svn://svn.savannah.gnu.org/nano/branches/nano_2_0_branch/nano
|
||||
$ svn co svn://svn.savannah.gnu.org/nano/branches/nano_2_2_branch/nano
|
||||
|
||||
|
||||
Generate the configure script
|
||||
@@ -83,5 +82,5 @@ you'll need to run that "make install" command with root privileges.
|
||||
Problems?
|
||||
---------
|
||||
|
||||
Please submit any bugs in the SVN branch using the Savannah project's
|
||||
bug tracker (https://savannah.gnu.org/bugs/?group=nano)
|
||||
Please submit any bugs in the SVN branch using the Savannah project's
|
||||
bug tracker (https://savannah.gnu.org/bugs/?group=nano).
|
||||
|
||||
45
THANKS
45
THANKS
@@ -5,7 +5,7 @@ If we missed you here, let us know!
|
||||
Sharuzzaman Ahmat Raslan <sharuzzaman@excite.com>
|
||||
Malay translator
|
||||
Laurentiu Buzdugan <buzdugan@voyager.net> Romanian translator
|
||||
CHAO Wei-Lun <chaoweilun@pcmail.com.tw> Traditional Chinese translator
|
||||
CHAO Wei-Lun <chaoweilun@pcmail.com.tw> Chinese (traditional) translator
|
||||
Ricardo Cárdenes Medina <ricardo@conisys.com> Spanish translator
|
||||
Marco Colombo <magicdice@inwind.it> Italian translator
|
||||
Yavor Doganov <yavor@doganov.org> Bulgarian translator
|
||||
@@ -13,37 +13,62 @@ Karl Eichwalder <keichwa@gmx.net> German translator
|
||||
Doruk Fisek <dfisek@fisek.com.tr> Turkish translator
|
||||
Jean-Philippe Guérard <jean-philippe.guerard@laposte.net>
|
||||
French translator
|
||||
Geir Helland Norwegian bokmål translator
|
||||
Geir Helland <pjallabais@users.sourceforge.net> Norwegian Bokmål translator
|
||||
Tedi Heriyanto <tedi_h@gmx.net> Indonesian translator
|
||||
Václav Haisman <V.Haisman@sh.cvut.cz> Czech translator
|
||||
Szabolcs Horvath <horvaths@janus.gimsz.sulinet.hu>
|
||||
Hungarian translator
|
||||
Kalle Kivimaa <kalle.kivimaa@iki.fi> Finnish Translator
|
||||
Eivind Kjørstad <ekj@vestdata.no> Norwegian nynorsk translator
|
||||
Kalle Kivimaa <kalle.kivimaa@iki.fi> Finnish translator
|
||||
Eivind Kjørstad <ekj@vestdata.no> Norwegian Nynorsk translator
|
||||
Florian König <floki@bigfoot.com> German translator
|
||||
Wojciech Kotwica <wkotwica@post.pl> Polish translator
|
||||
Clement Laforet <clem_laf@wanadoo.fr> French translator
|
||||
Gergely Nagy <algernon@debian.org> Hungarian translator
|
||||
Kalle Olavi Niemitalo <kon@iki.fi> Finnish Translator
|
||||
Kalle Olavi Niemitalo <kon@iki.fi> Finnish translator
|
||||
A. Murat EREN <meren@comu.edu.tr> Turkish translator
|
||||
Claudio Neves <cneves@nextis.com> Brazilian Portuguese translator
|
||||
Daniel Nylander <po@danielnylander.se> Swedish Translator
|
||||
Daniel Nylander <po@danielnylander.se> Swedish translator
|
||||
Michael Piefel <piefel@informatik.hu-berlin.de> German translator
|
||||
Sergey A. Ribalchenko <fisher@obu.ck.ua> Russian, Ukrainian translator
|
||||
Sergey A. Ribalchenko <fisher@obu.ck.ua> Ukrainian and Russian translator
|
||||
Michel Robitaille <robitail@IRO.UMontreal.CA> French translator
|
||||
Christian Rose <menthos@menthos.com> Swedish translator
|
||||
Stig E Sandoe <stig@ii.uib.no> Norwegian bokmål translator
|
||||
Benno Schulenberg <benno@nietvergeten.nl> Dutch translator
|
||||
Stig E Sandø <stig@ii.uib.no> Norwegian Bokmål translator
|
||||
Benno Schulenberg <benno@vertaalt.nl> Dutch and Esperanto translator
|
||||
Danilo Segan <dsegan@gmx.net> Serbian translator
|
||||
Keld Simonsen <keld@dkuug.dk> Danish translator
|
||||
Guus Sliepen <guus@nl.linux.org> Dutch translator
|
||||
Cezary Sliwa <sliwa@cft.edu.pl> Polish translator
|
||||
Pierre Tane <tanep@bigfoot.com> French translator
|
||||
Jacobo Tarrío <jtarrio@trasno.net> Galician translator
|
||||
Kjetil Torgrim Homme <kjetilho@linpro.no> Norwegian nynorsk translator
|
||||
Kjetil Torgrim Homme <kjetilho@linpro.no> Norwegian Nynorsk translator
|
||||
Miquel Vidal <miquel@sindominio.net> Catalan translator
|
||||
Phan Vinh Thinh <teppi82@gmail.com> Vietnamese translator
|
||||
Pauli Virtanen <pauli.virtanen@saunalahti.fi> Finnish translator
|
||||
Peio Ziarsolo <peio@sindominio.net> Basque translator
|
||||
Anton Zinoviev <zinoviev@debian.org> Bulgarian translator
|
||||
João Victor Duarte Martins <jvdm@sdf.lonestar.org>
|
||||
Brazilian Portuguese translator
|
||||
Kevin Patrick Scannell <kscanne@gmail.com> Irish translator
|
||||
Gabor Kelemen <kelemeng@gnome.hu> Hungarian translator
|
||||
Francisco Javier Tsao Santín <tsao@members.fsf.org>
|
||||
Galician translator
|
||||
Dimitriy Ryazantcev <DJm00n@mail.ru> Russian translator
|
||||
Clytie Siddall <clytie@riverland.net.au> Vietnamese translator
|
||||
LI Daobing <lidaobing@gmail.com> Chinese (simplified) translator
|
||||
Jorma Karvonen <karvonen.jorma@gmail.com> Finnish translator
|
||||
Aron Xu <happyaron.xu@gmail.com> Chinese (simplified) translator
|
||||
Pavel Fric <pavelfric@seznam.cz> Czech translator
|
||||
Pavel Maryanov <acid@jack.kiev.ua> Russian translator
|
||||
Sergey Poznyakoff <gray@gnu.org> Polish translator
|
||||
Ask Hjorth Larsen <asklarsen@gmail.com> Danish translator
|
||||
Trần Ngọc Quân <vnwildman@gmail.com> Vietnamese translator
|
||||
Klemen Košir <klemen913@gmail.com> Slovenian translator
|
||||
Yasuaki Taniguchi <yasuakit@gmail.com> Japanese translator
|
||||
Jorge González <aloriel@gmail.com> Spanish translator
|
||||
Johnny A. Solbu <johnny@solbu.net> Norwegian Bokmål translator
|
||||
Мирослав Николић <miroslavnikolic@rocketmail.com>
|
||||
Serbian translator
|
||||
|
||||
|
||||
Ben Armstrong <synrg@sanctuary.nslug.ns.ca> Negative -r value idea, code
|
||||
Thomas Dickey <dickey@herndon4.his.com> Curses help and advice
|
||||
|
||||
492
configure.ac
492
configure.ac
@@ -1,7 +1,7 @@
|
||||
# Configuration for GNU nano - a small and user-friendly text editor
|
||||
#
|
||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
||||
# 2008, 2009, 2010, 2011, 2013, 2014 Free Software Foundation, Inc.
|
||||
#
|
||||
# GNU nano is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
@@ -20,13 +20,15 @@
|
||||
#
|
||||
# $Id$
|
||||
|
||||
AC_INIT([GNU nano], [2.3.0], [nano-devel@gnu.org], [nano])
|
||||
AC_INIT([GNU nano], [2.3.4], [nano-devel@gnu.org], [nano])
|
||||
AC_CONFIG_SRCDIR([src/nano.c])
|
||||
AC_CANONICAL_TARGET([])
|
||||
AC_CANONICAL_HOST
|
||||
AM_INIT_AUTOMAKE
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
||||
AC_PREREQ(2.54)
|
||||
dnl Make sure the ONCE macros are available.
|
||||
|
||||
AC_PREREQ(2.61)
|
||||
|
||||
dnl Checks for programs.
|
||||
|
||||
@@ -35,6 +37,7 @@ AC_PROG_CC
|
||||
AC_PROG_LN_S
|
||||
AC_ISC_POSIX
|
||||
AC_SYS_LARGEFILE
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
dnl Internationalization macros.
|
||||
|
||||
@@ -49,166 +52,187 @@ AC_DEFINE_DIR([PKGDATADIR], [pkgdatadir], [Where data are placed to.])
|
||||
|
||||
dnl Checks for header files.
|
||||
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(getopt.h libintl.h limits.h regex.h sys/param.h wchar.h wctype.h stdarg.h magic.h)
|
||||
AC_CHECK_HEADERS(getopt.h libintl.h limits.h regex.h sys/param.h wchar.h wctype.h stdarg.h)
|
||||
|
||||
dnl Checks for options.
|
||||
|
||||
AC_ARG_ENABLE(debug,
|
||||
[ --enable-debug Enable debugging (disabled by default)],
|
||||
[if test x$enableval = xyes; then
|
||||
AC_DEFINE(DEBUG, 1, [Define this to enable debug messages and assert warnings.]) debug_support=yes
|
||||
fi])
|
||||
AC_ARG_ENABLE(browser,
|
||||
AS_HELP_STRING([--disable-browser], [Disable built-in file browser]))
|
||||
if test "x$enable_browser" = xno; then
|
||||
AC_DEFINE(DISABLE_BROWSER, 1, [Define this to disable the built-in file browser.])
|
||||
fi
|
||||
|
||||
if test x$debug_support != xyes; then
|
||||
AC_ARG_ENABLE(color,
|
||||
AS_HELP_STRING([--disable-color], [Disable color and syntax highlighting]))
|
||||
if test "x$enable_nanorc" = xno; then
|
||||
if test "x$enable_color" = xyes; then
|
||||
AC_MSG_ERROR([--enable-color cannot work with --disable-nanorc])
|
||||
else
|
||||
# Disabling nanorc silently disables color support.
|
||||
enable_color=no
|
||||
fi
|
||||
fi
|
||||
if test "x$enable_color" = xno; then
|
||||
AC_DEFINE(DISABLE_COLOR, 1, [Define this to disable syntax highlighting.])
|
||||
else
|
||||
if test x$ac_cv_header_regex_h != xyes; then
|
||||
AC_MSG_ERROR([
|
||||
*** The header file regex.h was not found. If you wish to have
|
||||
*** color support, this header file is required. Please either
|
||||
*** install C libraries that include the regex.h file, or call
|
||||
*** the configure script with --disable-color.])
|
||||
else
|
||||
color_support=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(extra,
|
||||
AS_HELP_STRING([--disable-extra], [Disable extra features, currently only easter eggs]))
|
||||
if test "x$enable_extra" = xno; then
|
||||
AC_DEFINE(DISABLE_EXTRA, 1, [Define this to disable extra stuff.])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(help,
|
||||
AS_HELP_STRING([--disable-help], [Disable help functions]))
|
||||
if test "x$enable_help" = xno; then
|
||||
AC_DEFINE(DISABLE_HELP, 1, [Define this to disable the help text display.])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(justify,
|
||||
AS_HELP_STRING([--disable-justify], [Disable justify/unjustify functions]))
|
||||
if test "x$enable_justify" = xno; then
|
||||
AC_DEFINE(DISABLE_JUSTIFY, 1, [Define this to disable the justify routines.])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(libmagic,
|
||||
AS_HELP_STRING([--disable-libmagic], [Disable detection of file types via libmagic]))
|
||||
|
||||
AC_ARG_ENABLE(mouse,
|
||||
AS_HELP_STRING([--disable-mouse], [Disable mouse support (and -m flag)]))
|
||||
if test "x$enable_mouse" = xno; then
|
||||
AC_DEFINE(DISABLE_MOUSE, 1, [Define this to disable the mouse support.])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(multibuffer,
|
||||
AS_HELP_STRING([--disable-multibuffer], [Disable multiple file buffers]))
|
||||
if test "x$enable_multibuffer" = xno; then
|
||||
AC_DEFINE(DISABLE_MULTIBUFFER, 1, [Define this to disable multiple file buffers.])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(nanorc,
|
||||
AS_HELP_STRING([--disable-nanorc], [Disable use of .nanorc files]))
|
||||
if test "x$enable_nanorc" = xno; then
|
||||
AC_DEFINE(DISABLE_NANORC, 1, [Define this to disable the use of .nanorc files.])
|
||||
else
|
||||
nanorc_support=yes
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(operatingdir,
|
||||
AS_HELP_STRING([--disable-operatingdir], [Disable setting of operating directory (chroot of sorts)]))
|
||||
if test "x$enable_operatingdir" = xno; then
|
||||
AC_DEFINE(DISABLE_OPERATINGDIR, 1, [Define this to disable the setting of the operating directory (chroot of sorts).])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(speller,
|
||||
AS_HELP_STRING([--disable-speller], [Disable spell checker functions]))
|
||||
if test "x$enable_speller" = xno; then
|
||||
AC_DEFINE(DISABLE_SPELLER, 1, [Define this to disable the spell checker functions.])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(tabcomp,
|
||||
AS_HELP_STRING([--disable-tabcomp], [Disable tab completion functions]))
|
||||
if test "x$enable_tabcomp" = xno; then
|
||||
AC_DEFINE(DISABLE_TABCOMP, 1, [Define this to disable the tab completion functions for files and search strings.])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(wrapping,
|
||||
AS_HELP_STRING([--disable-wrapping], [Disable all wrapping of text (and -w flag)]))
|
||||
if test "x$enable_wrapping" = xno; then
|
||||
AC_DEFINE(DISABLE_WRAPPING, 1, [Define this to disable all text wrapping.])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(wrapping-as-root,
|
||||
AS_HELP_STRING([--disable-wrapping-as-root], [Disable wrapping of text as root by default]))
|
||||
if test "x$enable_wrapping_as_root" = xno; then
|
||||
AC_DEFINE(DISABLE_ROOTWRAPPING, 1, [Define this to disable text wrapping as root by default.])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(debug,
|
||||
AS_HELP_STRING([--enable-debug], [Enable debugging (disabled by default)]))
|
||||
if test "x$enable_debug" = xyes; then
|
||||
AC_DEFINE(DEBUG, 1, [Define this to enable debug messages and assert warnings.])
|
||||
else
|
||||
AC_DEFINE(NDEBUG, 1, [Shut up assert warnings :-)])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(tiny,
|
||||
[ --enable-tiny Disable features for the sake of size],
|
||||
[if test x$enableval = xyes; then
|
||||
AC_DEFINE(NANO_TINY, 1, [Define this to make the nano executable as small as possible.]) tiny_support=yes
|
||||
AC_DEFINE(DISABLE_BROWSER, 1, [Define this to disable the built-in file browser.])
|
||||
AC_DEFINE(DISABLE_HELP, 1, [Define this to disable the help text display.])
|
||||
AC_DEFINE(DISABLE_JUSTIFY, 1, [Define this to disable the justify routines.])
|
||||
AC_DEFINE(DISABLE_MOUSE, 1, [Define this to disable the mouse support.])
|
||||
AC_DEFINE(DISABLE_OPERATINGDIR, 1, [Define this to disable the setting of the operating directory (chroot of sorts).])
|
||||
AC_DEFINE(DISABLE_SPELLER, 1, [Define this to disable the spell checker functions.])
|
||||
AC_DEFINE(DISABLE_TABCOMP, 1, [Define to disable the tab completion functions for files and search strings.])
|
||||
AC_DEFINE(DISABLE_WRAPPING, 1, [Define this to disable all text wrapping.])
|
||||
fi])
|
||||
|
||||
|
||||
AC_ARG_ENABLE(extra,
|
||||
[ --disable-extra Disable extra features, currently only easter eggs],
|
||||
[if test x$enableval != xno; then
|
||||
AC_DEFINE(NANO_EXTRA, 1, [Define this to enable extra stuff.]) extra_support=yes
|
||||
fi],
|
||||
[if test x$enable_tiny != xyes; then
|
||||
AC_DEFINE(NANO_EXTRA, 1, [Define this to enable extra stuff.]) extra_support=yes
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(browser,
|
||||
[ --disable-browser Disable built-in file browser],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_BROWSER, 1, [Define this to disable the built-in file browser.])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(help,
|
||||
[ --disable-help Disable help functions],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_HELP, 1, [Define this to disable the help text display.])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(justify,
|
||||
[ --disable-justify Disable justify/unjustify functions],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_JUSTIFY, 1, [Define this to disable the justify routines.])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(mouse,
|
||||
[ --disable-mouse Disable mouse support (and -m flag)],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_MOUSE, 1, [Define this to disable the mouse support.])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(operatingdir,
|
||||
[ --disable-operatingdir Disable setting of operating directory (chroot of sorts)],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_OPERATINGDIR, 1, [Define this to disable the setting of the operating directory (chroot of sorts).])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(speller,
|
||||
[ --disable-speller Disable spell checker functions],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_SPELLER, 1, [Define this to disable the spell checker functions.])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(tabcomp,
|
||||
[ --disable-tabcomp Disable tab completion functions],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_TABCOMP, 1, [Define to disable the tab completion functions for files and search strings.])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(wrapping,
|
||||
[ --disable-wrapping Disable all wrapping of text (and -w flag)],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_WRAPPING, 1, [Define this to disable all text wrapping.])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(wrapping-as-root,
|
||||
[ --disable-wrapping-as-root Disable wrapping of text as root by default],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_ROOTWRAPPING, 1, [Define this to disable text wrapping as root by default.])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(color,
|
||||
[ --disable-color Disable color and syntax highlighting],
|
||||
if test x$enableval != xno; then
|
||||
if test x$ac_cv_header_regex_h = xyes; then
|
||||
AC_DEFINE(ENABLE_NANORC, 1, [Define this to use .nanorc files.]) nanorc_support=yes
|
||||
AC_DEFINE(ENABLE_COLOR, 1, [Define this to have syntax highlighting, requires regex.h and ENABLE_NANORC too!]) color_support=yes
|
||||
else
|
||||
AC_MSG_ERROR([
|
||||
*** The header file regex.h was not found. If you wish to use color
|
||||
*** support this header file is required. Please either install C
|
||||
*** libraries that include the regex.h file or call the configure
|
||||
*** script with --disable-color.])
|
||||
AS_HELP_STRING([--enable-tiny], [Disable features for the sake of size]))
|
||||
if test "x$enable_tiny" = xyes; then
|
||||
AC_DEFINE(NANO_TINY, 1, [Define this to make the nano executable as small as possible.])
|
||||
if test "x$enable_browser" != xyes; then
|
||||
AC_DEFINE(DISABLE_BROWSER, 1, [Define this to disable the built-in file browser.])
|
||||
fi
|
||||
fi,
|
||||
if test x$enable_tiny != xyes; then
|
||||
if test x$ac_cv_header_regex_h = xyes; then
|
||||
AC_DEFINE(ENABLE_NANORC, 1, [Define this to use .nanorc files.]) nanorc_support=yes
|
||||
AC_DEFINE(ENABLE_COLOR, 1, [Define this to have syntax highlighting, requires regex.h and ENABLE_NANORC too!]) color_support=yes
|
||||
else
|
||||
AC_MSG_ERROR([
|
||||
*** The header file regex.h was not found. If you wish to use color
|
||||
*** support this header file is required. Please either install C
|
||||
*** libraries that include the regex.h file or call the configure
|
||||
*** script with --disable-color.])
|
||||
if test "x$enable_color" != xyes; then
|
||||
AC_DEFINE(DISABLE_COLOR, 1, [Define this to disable syntax highlighting.])
|
||||
color_support=no
|
||||
else
|
||||
if test "x$enable_nanorc" != xyes; then
|
||||
AC_MSG_ERROR([--enable-color with --enable-tiny cannot work without --enable-nanorc])
|
||||
fi
|
||||
fi
|
||||
)
|
||||
if test "x$enable_extra" != xyes; then
|
||||
AC_DEFINE(DISABLE_EXTRA, 1, [Define this to disable extra stuff.])
|
||||
fi
|
||||
if test "x$enable_help" != xyes; then
|
||||
AC_DEFINE(DISABLE_HELP, 1, [Define this to disable the help text display.])
|
||||
fi
|
||||
if test "x$enable_justify" != xyes; then
|
||||
AC_DEFINE(DISABLE_JUSTIFY, 1, [Define this to disable the justify routines.])
|
||||
fi
|
||||
if test "x$enable_libmagic" != xyes; then
|
||||
enable_libmagic=no
|
||||
fi
|
||||
if test "x$enable_mouse" != xyes; then
|
||||
AC_DEFINE(DISABLE_MOUSE, 1, [Define this to disable the mouse support.])
|
||||
fi
|
||||
if test "x$enable_multibuffer" != xyes; then
|
||||
AC_DEFINE(DISABLE_MULTIBUFFER, 1, [Define this to disable multiple file buffers.])
|
||||
fi
|
||||
if test "x$enable_nanorc" != xyes; then
|
||||
AC_DEFINE(DISABLE_NANORC, 1, [Define this to disable the use of .nanorc files.])
|
||||
fi
|
||||
if test "x$enable_operatingdir" != xyes; then
|
||||
AC_DEFINE(DISABLE_OPERATINGDIR, 1, [Define this to disable the setting of the operating directory (chroot of sorts).])
|
||||
fi
|
||||
if test "x$enable_speller" != xyes; then
|
||||
AC_DEFINE(DISABLE_SPELLER, 1, [Define this to disable the spell checker functions.])
|
||||
fi
|
||||
if test "x$enable_tabcomp" != xyes; then
|
||||
AC_DEFINE(DISABLE_TABCOMP, 1, [Define this to disable the tab completion functions for files and search strings.])
|
||||
fi
|
||||
if test "x$enable_wrapping" != xyes; then
|
||||
AC_DEFINE(DISABLE_WRAPPING, 1, [Define this to disable all text wrapping.])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(multibuffer,
|
||||
[ --disable-multibuffer Disable multiple file buffers],
|
||||
[if test x$enableval != xno; then
|
||||
AC_DEFINE(ENABLE_MULTIBUFFER, 1, [Define this to enable multiple file buffers.]) multibuffer_support=yes
|
||||
fi],
|
||||
[if test x$enable_tiny != xyes; then
|
||||
AC_DEFINE(ENABLE_MULTIBUFFER, 1, [Define this to enable multiple file buffers.]) multibuffer_support=yes
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(nanorc,
|
||||
[ --disable-nanorc Disable use of .nanorc files],
|
||||
[if test x$enableval != xno; then
|
||||
AC_DEFINE(ENABLE_NANORC, 1, [Define this to use .nanorc files.]) nanorc_support=yes
|
||||
fi],
|
||||
[if test x$enable_tiny != xyes; then
|
||||
AC_DEFINE(ENABLE_NANORC, 1, [Define this to use .nanorc files.]) nanorc_support=yes
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(all,
|
||||
[ --enable-all Enable ALL extra nano functionality (ignored for compatibility as all options default to on)],
|
||||
[if test x$enableval = xyes; then
|
||||
echo "--enable-all option no longer needed, ignoring for compatibility"
|
||||
fi])
|
||||
AM_CONDITIONAL(USE_COLOR, test x$color_support = xyes)
|
||||
AM_CONDITIONAL(USE_NANORC, test x$nanorc_support = xyes)
|
||||
|
||||
AC_MSG_CHECKING([whether to enable UTF-8 support])
|
||||
AC_ARG_ENABLE(utf8,
|
||||
[ --enable-utf8 Enable UTF-8 support],
|
||||
[if test x$enableval = xyes; then
|
||||
enable_utf8=yes
|
||||
else
|
||||
enable_utf8=no
|
||||
fi],
|
||||
[enable_utf8=auto])
|
||||
AC_MSG_RESULT($enable_utf8)
|
||||
AC_ARG_ENABLE(utf8, AS_HELP_STRING([--enable-utf8], [Enable UTF-8 support]))
|
||||
AC_MSG_RESULT(${enable_utf8:-auto})
|
||||
|
||||
AC_ARG_ENABLE(altrcname,
|
||||
AS_HELP_STRING([--enable-altrcname], [Specify an alternate rcfile name (default: .nanorc)]),
|
||||
[if test x$enableval != no; then
|
||||
AC_DEFINE_UNQUOTED(RCFILE_NAME, "$enableval", [Specify an alternate rcfile name (default: .nanorc).]) rcfilename=$enableval
|
||||
fi])
|
||||
|
||||
|
||||
AC_MSG_CHECKING([whether to use slang])
|
||||
CURSES_LIB_NAME=""
|
||||
AC_ARG_WITH(slang,
|
||||
[ --with-slang[=DIR] Use the slang library instead of curses],
|
||||
AS_HELP_STRING([--with-slang[=DIR]], [Use the slang library instead of curses]),
|
||||
[ case "$with_slang" in
|
||||
no)
|
||||
AC_MSG_RESULT(no)
|
||||
@@ -217,12 +241,12 @@ AC_ARG_WITH(slang,
|
||||
AC_MSG_RESULT(yes)
|
||||
|
||||
if test x$with_slang != xyes; then
|
||||
# Add additional search path
|
||||
# Add additional search path.
|
||||
LDFLAGS="-L$with_slang/lib $LDFLAGS"
|
||||
CPPFLAGS="-I$with_slang/include $CPPFLAGS"
|
||||
fi
|
||||
|
||||
if test x$enable_utf8 != xno; then
|
||||
if test "x$enable_utf8" != xno; then
|
||||
AC_CHECK_HEADER(slcurses.h,
|
||||
AC_MSG_CHECKING([for SLutf8_enable in -lslang])
|
||||
_libs=$LIBS
|
||||
@@ -235,7 +259,7 @@ int main(void)
|
||||
return 0;
|
||||
}],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.]) slang_support=yes
|
||||
AC_DEFINE(USE_SLANG, 1, [Define this to use the slang wrappers for curses instead of native curses.])
|
||||
CURSES_LIB_WIDE=yes
|
||||
if test x$with_slang != xyes; then
|
||||
CURSES_LIB="-L${with_slang}/lib -lslang"
|
||||
@@ -245,7 +269,7 @@ int main(void)
|
||||
CURSES_LIB_NAME=slang],
|
||||
[AC_MSG_RESULT(no)
|
||||
|
||||
# We might need the term library
|
||||
# We might need the term library.
|
||||
for termlib in ncurses curses termcap terminfo termlib; do
|
||||
AC_CHECK_LIB([${termlib}], tputs, [tcap="-l$termlib"])
|
||||
test -n "$tcap" && break
|
||||
@@ -261,7 +285,7 @@ int main(void)
|
||||
return 0;
|
||||
}],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.]) slang_support=yes
|
||||
AC_DEFINE(USE_SLANG, 1, [Define this to use the slang wrappers for curses instead of native curses.])
|
||||
CURSES_LIB_WIDE=yes
|
||||
if test x$with_slang != xyes; then
|
||||
CURSES_LIB="-L${with_slang}/lib -lslang $tcap"
|
||||
@@ -271,7 +295,7 @@ int main(void)
|
||||
CURSES_LIB_NAME=slang],
|
||||
[AC_MSG_RESULT(no)
|
||||
|
||||
# We might need the math library
|
||||
# We might need the math library.
|
||||
AC_MSG_CHECKING([for SLutf8_enable in -lslang $tcap -lm])
|
||||
LIBS="$LIBS -lm"
|
||||
AC_TRY_RUN([
|
||||
@@ -282,7 +306,7 @@ int main(void)
|
||||
return 0;
|
||||
}],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.]) slang_support=yes
|
||||
AC_DEFINE(USE_SLANG, 1, [Define this to use the slang wrappers for curses instead of native curses.])
|
||||
CURSES_LIB_WIDE=yes
|
||||
if test x$with_slang != xyes; then
|
||||
CURSES_LIB="-L${with_slang}/lib -lslang $tcap -lm"
|
||||
@@ -302,8 +326,8 @@ int main(void)
|
||||
fi
|
||||
|
||||
if eval "test x$CURSES_LIB_NAME = x"; then
|
||||
# Reset libs if the above slang tests failed
|
||||
if test x$enable_utf8 != xno; then
|
||||
# Reset libs if the above slang tests failed.
|
||||
if test "x$enable_utf8" != xno; then
|
||||
LIBS=$_libs
|
||||
fi
|
||||
|
||||
@@ -319,7 +343,7 @@ int main(void)
|
||||
return 0;
|
||||
}],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.]) slang_support=yes
|
||||
AC_DEFINE(USE_SLANG, 1, [Define this to use the slang wrappers for curses instead of native curses.])
|
||||
if test x$with_slang != xyes; then
|
||||
CURSES_LIB="-L${with_slang}/lib -lslang"
|
||||
else
|
||||
@@ -328,7 +352,7 @@ int main(void)
|
||||
CURSES_LIB_NAME=slang],
|
||||
[AC_MSG_RESULT(no)
|
||||
|
||||
# We might need the term library
|
||||
# We might need the term library.
|
||||
for termlib in ncurses curses termcap terminfo termlib; do
|
||||
AC_CHECK_LIB([${termlib}], tputs, [tcap="-l$termlib"])
|
||||
test -n "$tcap" && break
|
||||
@@ -344,7 +368,7 @@ int main(void)
|
||||
return 0;
|
||||
}],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.]) slang_support=yes
|
||||
AC_DEFINE(USE_SLANG, 1, [Define this to use the slang wrappers for curses instead of native curses.])
|
||||
if test x$with_slang != xyes; then
|
||||
CURSES_LIB="-L${with_slang}/lib -lslang $tcap"
|
||||
else
|
||||
@@ -353,7 +377,7 @@ int main(void)
|
||||
CURSES_LIB_NAME=slang],
|
||||
[AC_MSG_RESULT(no)
|
||||
|
||||
# We might need the math library
|
||||
# We might need the math library.
|
||||
AC_MSG_CHECKING([for SLtt_initialize in -lslang $tcap -lm])
|
||||
LIBS="$LIBS -lm"
|
||||
AC_TRY_RUN([
|
||||
@@ -364,7 +388,7 @@ int main(void)
|
||||
return 0;
|
||||
}],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.]) slang_support=yes
|
||||
AC_DEFINE(USE_SLANG, 1, [Define this to use the slang wrappers for curses instead of native curses.])
|
||||
if test x$with_slang != xyes; then
|
||||
CURSES_LIB="-L${with_slang}/lib -lslang $tcap -lm"
|
||||
else
|
||||
@@ -392,57 +416,79 @@ int main(void)
|
||||
;;
|
||||
esac], [AC_MSG_RESULT(no)])
|
||||
|
||||
if test x$CURSES_LIB_NAME = xslang; then
|
||||
AC_DEFINE(NANO_TINY, 1, [Define this to make the nano executable as small as possible.]) tiny_support=yes
|
||||
AC_DEFINE(DISABLE_BROWSER, 1, [Define this to disable the built-in file browser.])
|
||||
AC_DEFINE(DISABLE_HELP, 1, [Define this to disable the help text display.])
|
||||
AC_DEFINE(DISABLE_JUSTIFY, 1, [Define this to disable the justify routines.])
|
||||
AC_DEFINE(DISABLE_MOUSE, 1, [Define this to disable the mouse support.])
|
||||
AC_DEFINE(DISABLE_OPERATINGDIR, 1, [Define this to disable the setting of the operating directory (chroot of sorts).])
|
||||
AC_DEFINE(DISABLE_SPELLER, 1, [Define this to disable the spell checker functions.])
|
||||
AC_DEFINE(DISABLE_TABCOMP, 1, [Define to disable the tab completion functions for files and search strings.])
|
||||
AC_DEFINE(DISABLE_WRAPPING, 1, [Define this to disable all text wrapping.])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(USE_COLOR, test x$color_support = xyes)
|
||||
AM_CONDITIONAL(USE_NANORC, test x$nanorc_support = xyes)
|
||||
|
||||
AC_ARG_ENABLE(altrcname,
|
||||
[ --enable-altrcname Specify alternate rcfile name (default: .nanorc)],
|
||||
[if test x$enableval != no; then
|
||||
AC_DEFINE_UNQUOTED(RCFILE_NAME, "$enableval", [Specify alternate rcfile name (default: .nanorc)]) rcfilename=$enableval
|
||||
fi])
|
||||
|
||||
dnl Checks for functions.
|
||||
|
||||
AC_CHECK_FUNCS(getdelim getline isblank strcasecmp strcasestr strncasecmp strnlen vsnprintf)
|
||||
AC_CHECK_FUNCS(getdelim getline isblank strcasecmp strcasestr strncasecmp strnlen snprintf vsnprintf)
|
||||
|
||||
if test x$enable_utf8 != xno; then
|
||||
if test "x$enable_utf8" != xno; then
|
||||
AC_CHECK_FUNCS(iswalnum iswblank iswpunct iswspace nl_langinfo mblen mbstowcs mbtowc wctomb wcwidth)
|
||||
fi
|
||||
|
||||
if test x$ac_cv_func_snprintf = xno; then
|
||||
AM_PATH_GLIB_2_0(2.0.0,,
|
||||
AC_MSG_ERROR([
|
||||
*** snprintf() not found. GLIB 2.x not found either.
|
||||
*** You should install the GLIB 2.x library which can
|
||||
*** be found at http://ftp.gtk.org/.]),
|
||||
glib)
|
||||
fi
|
||||
|
||||
if test x$ac_cv_func_vsnprintf = xno; then
|
||||
AM_PATH_GLIB_2_0(2.0.0,,
|
||||
AC_MSG_ERROR([
|
||||
*** vsnprintf() not found. GLIB 2.x not found either. You should
|
||||
*** install the GLIB 2.x library which can be found at
|
||||
*** ftp://ftp.gtk.org/.]),
|
||||
*** vsnprintf() not found. GLIB 2.x not found either.
|
||||
*** You should install the GLIB 2.x library which can
|
||||
*** be found at http://ftp.gtk.org/.]),
|
||||
glib)
|
||||
fi
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
|
||||
dnl Checks for available flags.
|
||||
|
||||
AX_CHECK_COMPILE_FLAG([-Wall], [CFLAGS="$CFLAGS -Wall"], [], [])
|
||||
|
||||
dnl Checks for library functions.
|
||||
|
||||
AC_TYPE_SIGNAL
|
||||
AC_FUNC_VPRINTF
|
||||
AC_CHECK_FUNCS(getopt_long)
|
||||
|
||||
dnl Checks for libraries.
|
||||
|
||||
if eval "test x$CURSES_LIB_NAME = x"; then
|
||||
if test "x$enable_utf8" != xno; then
|
||||
PKG_CHECK_MODULES([NCURSESW], [ncursesw], [
|
||||
CURSES_LIB=$NCURSESW_LIBS
|
||||
CPPFLAGS="$NCURSESW_CFLAGS $CPPFLAGS"
|
||||
CURSES_LIB_NAME=ncursesw
|
||||
CURSES_LIB_WIDE=yes
|
||||
], [:])
|
||||
else
|
||||
PKG_CHECK_MODULES([NCURSES], [ncurses], [
|
||||
CURSES_LIB=$NCURSES_LIBS
|
||||
CPPFLAGS="$NCURSES_CFLAGS $CPPFLAGS"
|
||||
CURSES_LIB_NAME=ncurses
|
||||
], [:])
|
||||
fi
|
||||
fi
|
||||
|
||||
if eval "test x$CURSES_LIB_NAME = x"; then
|
||||
AC_CHECK_HEADERS(ncurses.h)
|
||||
|
||||
if test x$enable_utf8 != xno; then
|
||||
AC_CHECK_LIB(ncursesw, get_wch, [CURSES_LIB="-lncursesw" CPPFLAGS="-I/usr/include/ncursesw $CPPFLAGS" CURSES_LIB_NAME=ncursesw CURSES_LIB_WIDE=yes])
|
||||
if test "x$enable_utf8" != xno; then
|
||||
OLDLIBS="$LIBS"
|
||||
AC_CHECK_TOOL(NCURSESW_CONFIG, ncursesw5-config, no)
|
||||
if test "x$NCURSESW_CONFIG" != xno; then
|
||||
CURSES_LIB=`$NCURSESW_CONFIG --libs`
|
||||
LIBS="$CURSES_LIB $LIBS"
|
||||
CPPFLAGS="`$NCURSESW_CONFIG --cflags` $CPPFLAGS"
|
||||
AC_CHECK_LIB(ncursesw, get_wch, [CURSES_LIB_NAME=ncursesw CURSES_LIB_WIDE=yes])
|
||||
else
|
||||
AC_CHECK_LIB(ncursesw, get_wch, [CURSES_LIB="-lncursesw" CURSES_LIB_NAME=ncursesw CURSES_LIB_WIDE=yes])
|
||||
fi
|
||||
LIBS="$OLDLIBS"
|
||||
fi
|
||||
|
||||
if eval "test x$CURSES_LIB_NAME = x"; then
|
||||
@@ -453,12 +499,12 @@ fi
|
||||
if eval "test x$CURSES_LIB_NAME = x"; then
|
||||
AC_CHECK_HEADERS(curses.h)
|
||||
|
||||
if test x$enable_utf8 != xno; then
|
||||
if test "x$enable_utf8" != xno; then
|
||||
AC_CHECK_LIB(curses, get_wch, [CURSES_LIB="-lcurses" CURSES_LIB_NAME=curses CURSES_LIB_WIDE=yes])
|
||||
fi
|
||||
|
||||
if eval "test x$CURSES_LIB_NAME = x"; then
|
||||
AC_CHECK_LIB(curses, initscr, [CURSES_LIB="-lcurses" CURSES_LIB_NAME=curses])
|
||||
AC_CHECK_LIB(curses, initscr, [CURSES_LIB="-lcurses" CURSES_LIB_NAME=curses])
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -486,7 +532,7 @@ if test "x$GLIB_LIBS" != "x"; then
|
||||
LDFLAGS="$LDFLAGS $GLIB_LIBS"
|
||||
fi
|
||||
|
||||
if test x$enable_utf8 != xno && \
|
||||
if test "x$enable_utf8" != xno && \
|
||||
test x$CURSES_LIB_WIDE = xyes && \
|
||||
test x$ac_cv_func_iswalnum = xyes && \
|
||||
test x$ac_cv_func_iswpunct = xyes && \
|
||||
@@ -499,14 +545,14 @@ if test x$enable_utf8 != xno && \
|
||||
test x$ac_cv_func_wcwidth = xyes; then
|
||||
AC_DEFINE(ENABLE_UTF8, 1, [Define this if your system has sufficient UTF-8 support (a wide curses library, iswalnum(), iswpunct(), iswblank() or iswspace(), nl_langinfo, mblen(), mbstowcs(), mbtowc(), wctomb(), and wcwidth()).])
|
||||
else
|
||||
if test x$enable_utf8 = xyes; then
|
||||
if test "x$enable_utf8" = xyes; then
|
||||
AC_MSG_ERROR([
|
||||
*** UTF-8 support was requested, but insufficient UTF-8 support was
|
||||
*** detected in your curses and/or C libraries. Please verify that your
|
||||
*** slang was built with UTF-8 support or your curses was built with
|
||||
*** wide character support, and that your C library was built with wide
|
||||
*** character support.])
|
||||
elif test x$enable_utf8 != xno; then
|
||||
elif test "x$enable_utf8" != xno; then
|
||||
AC_MSG_WARN([
|
||||
*** Insufficient UTF-8 support was detected in your curses and/or C
|
||||
*** libraries. If you want UTF-8 support, please verify that your slang
|
||||
@@ -517,9 +563,24 @@ else
|
||||
fi
|
||||
|
||||
if test x$color_support = xyes; then
|
||||
# now check for the end of word boundary support (/< and />)
|
||||
# Now check for the end-of-word boundary support (/< and />).
|
||||
AC_MSG_CHECKING([for GNU-style word boundary regex support])
|
||||
AC_TRY_RUN([
|
||||
|
||||
AC_ARG_WITH(wordbounds,
|
||||
AS_HELP_STRING([--with-wordbounds], [Use GNU-style word boundary delimiters]),
|
||||
[ case "$with_wordbounds" in
|
||||
no)
|
||||
AC_MSG_RESULT(no)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(yes)
|
||||
# We explicitly don't check if the user forced the option, because
|
||||
# this is needed for cross compilers and we can't test the target.
|
||||
AC_DEFINE(GNU_WORDBOUNDS, 1, [Define this if the system supports GNU-style word boundaries in regexes.]) gnu_wordbounds=yes,
|
||||
;;
|
||||
esac
|
||||
], [
|
||||
AC_TRY_RUN([
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
@@ -531,16 +592,18 @@ int main(void)
|
||||
regmatch_t pmatch;
|
||||
|
||||
if (regcomp(&r, "\\\\>", REG_EXTENDED|REG_NOSUB))
|
||||
return 1;
|
||||
return 1;
|
||||
if (regexec(&r, "word boundary", nmatch, &pmatch, 0))
|
||||
return 1;
|
||||
return 1;
|
||||
return 0;
|
||||
}],
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(GNU_WORDBOUNDS, 1, [Define if the system supports GNU-style word boundaries in regexes.]) gnu_wordbounds=yes,
|
||||
AC_MSG_RESULT(no),
|
||||
AC_MSG_WARN([*** Can't check for GNU-style word boundary support when cross-compiling])
|
||||
)
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(GNU_WORDBOUNDS, 1, [Define this if the system supports GNU-style word boundaries in regexes.]) gnu_wordbounds=yes,
|
||||
AC_MSG_RESULT(no),
|
||||
AC_MSG_WARN([*** Can't check for GNU-style word boundary support when cross-compiling])
|
||||
)
|
||||
])
|
||||
|
||||
# if test x$CURSES_LIB_NAME = xcurses; then
|
||||
AC_MSG_CHECKING([whether _XOPEN_SOURCE_EXTENDED is needed])
|
||||
AC_TRY_RUN([
|
||||
@@ -577,28 +640,35 @@ int main(void)
|
||||
LINES = 80;
|
||||
COLS = 25;
|
||||
return 0;
|
||||
}],
|
||||
AC_DEFINE(REDEFINIG_MACROS_OK, 1, [Define this if you know your curses library allows LINES and COLS to be redefined to deal with a resizing bug])
|
||||
}],
|
||||
AC_DEFINE(REDEFINING_MACROS_OK, 1, [Define this if you know your curses library allows LINES and COLS to be redefined to deal with a resizing bug])
|
||||
AC_MSG_RESULT(yes),
|
||||
AC_MSG_RESULT(no),
|
||||
AC_MSG_WARN([*** Can't check for macro redefinability when cross-compiling]))
|
||||
|
||||
AC_CHECK_LIB(magic, magic_open)
|
||||
AS_IF([test "x$enable_libmagic" != "xno"], [
|
||||
AC_CHECK_HEADERS_ONCE([magic.h])
|
||||
AC_CHECK_LIB(magic, magic_open)
|
||||
])
|
||||
|
||||
# Check for groff html support
|
||||
# Check for groff html support.
|
||||
AC_MSG_CHECKING([for HTML support in groff])
|
||||
groff -t -mandoc -Thtml </dev/null >/dev/null
|
||||
if test $? -ne 0 ; then
|
||||
echo "no"
|
||||
echo "*** Will not generate HTML version of man pages ***"
|
||||
echo "*** Consider installing a newer version of groff with HTML support ***"
|
||||
if test $? -ne 0 ; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_WARN([*** Will not generate HTML version of man pages ***
|
||||
*** Consider installing a newer version of groff with HTML support ***])
|
||||
groff_html_support=no
|
||||
else
|
||||
echo "yes"
|
||||
AC_MSG_RESULT([yes])
|
||||
groff_html_support=yes
|
||||
fi
|
||||
AM_CONDITIONAL(GROFF_HTML, test x$groff_html_support = xyes)
|
||||
|
||||
# Check for the availability of makeinfo.
|
||||
AC_CHECK_PROG(haveit, makeinfo, yes, no)
|
||||
AM_CONDITIONAL(HAVE_MAKEINFO, test x$haveit = xyes)
|
||||
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
if USE_COLOR
|
||||
SUBDIRS = man syntax texinfo
|
||||
else
|
||||
SUBDIRS = man texinfo
|
||||
SUBDIRS = man
|
||||
|
||||
if HAVE_MAKEINFO
|
||||
SUBDIRS += texinfo
|
||||
endif
|
||||
|
||||
EXTRA_DIST = faq.html
|
||||
if USE_COLOR
|
||||
SUBDIRS += syntax
|
||||
endif
|
||||
|
||||
dist_html_DATA = faq.html
|
||||
|
||||
106
doc/faq.html
106
doc/faq.html
@@ -24,7 +24,6 @@
|
||||
<blockquote><p><a href="#3.1">3.1. How do I install the RPM or DEB package?</a><br>
|
||||
<a href="#3.2">3.2. Compiling from source: WHAT THE HECK DO I DO NOW?</a><br>
|
||||
<a href="#3.3">3.3. Why does everything go into /usr/local?</a><br>
|
||||
<a href="#3.4">3.4. I get errors about 'bindtextdomain','gettext', and/or 'gettextdomain'. What can I do about it?</a><br>
|
||||
<a href="#3.5">3.5. nano should automatically run strip on the binary when installing it!</a><br>
|
||||
<a href="#3.6">3.6. How can I make the executable smaller? This is too bloated!</a><br>
|
||||
<a href="#3.7">3.7. Tell me more about this multibuffer stuff!</a><br>
|
||||
@@ -47,7 +46,7 @@
|
||||
<a href="#4.12">4.12. I've compiled nano with color support, but I don't see any color when I run it!</a><br>
|
||||
<a href="#4.13">4.13. How do I select text for or paste text from the clipboard in an X terminal when I'm running nano in one and nano's mouse support is turned on?</a><br>
|
||||
<a href="#4.14">4.14. When I paste text into a document, each line gets indented further than the last. Why does nano do this, and how can I avoid it?</a><br>
|
||||
<a href="#4.15">4.15. On startup I get a message that says "Detected a legacy nano history file". Now other nano versionc can't find my search history!</a></p></blockquote>
|
||||
<a href="#4.15">4.15. On startup I get a message that says "Detected a legacy nano history file". Now older nano versions can't find my search history!</a></p></blockquote>
|
||||
<h2><a href="#5">5. Internationalization</a></h2>
|
||||
<blockquote><p><a href="#5.1">5.1. There's no translation for my language!</a><br>
|
||||
<a href="#5.2">5.2. I don't like the translation for <x> in my language. How can I fix it?</a><br>
|
||||
@@ -85,7 +84,7 @@
|
||||
<h2><a name="1.5"></a>1.5. Why the name change from TIP?</h2>
|
||||
<blockquote><p>On January 10, 2000, TIP was officially renamed to nano because of a namespace conflict with another program called 'tip'. The original 'tip' program "establishes a full duplex terminal connection to a remote host", and was included with many older Unix systems (and newer ones like Solaris). The conflict was not noticed at first because there is no 'tip' utility included with most GNU/Linux distributions (where nano was developed).</p></blockquote>
|
||||
<h2><a name="1.6"></a>1.6. What is the current version of nano?</h2>
|
||||
<blockquote><p>The current version of nano *should* be 2.2.0. Of course, you should always check the nano homepage to see what the latest and greatest version is.</p></blockquote>
|
||||
<blockquote><p>The current stable version of nano *should* be 2.2.6. Of course, you should always check the nano homepage to see what the latest and greatest version is.</p></blockquote>
|
||||
<h2><a name="1.7"></a>1.7. I want to read the man page without having to download the program!</h2>
|
||||
<blockquote><p>Jeez, demanding, aren't we? Okay, look <a href="http://www.nano-editor.org/dist/v2.2/nano.1.html">here</a>.</p></blockquote>
|
||||
<hr width="100%">
|
||||
@@ -94,7 +93,6 @@
|
||||
<blockquote><p>The nano distribution can be downloaded at the following fine web and ftp sites:</p>
|
||||
<ul>
|
||||
<li><a href="http://www.nano-editor.org/dist/">http://www.nano-editor.org/dist/</a></li>
|
||||
<li><a href="http://www.ewtoo.org/~astyanax/nano/dist/">http://www.ewtoo.org/~astyanax/nano/dist/</a></li>
|
||||
<li><a href="ftp://ftp.gnu.org/pub/gnu/nano/">ftp://ftp.gnu.org/pub/gnu/nano/</a></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
@@ -102,18 +100,17 @@
|
||||
<blockquote>
|
||||
<ul>
|
||||
<li><a href="http://www.nano-editor.org/dist/v2.2/RPMS/">http://www.nano-editor.org/dist/v2.2/RPMS/</a></li>
|
||||
<li><a href="http://www.ewtoo.org/~astyanax/nano/dist/v2.2/RPMS/">http://www.ewtoo.org/~astyanax/nano/dist/v2.2/RPMS/</a></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
<h2><a name="2.3"></a>2.3. Debian (.deb) packages.</h2>
|
||||
<blockquote><p>Debian users can check out the current nano packages for:</p>
|
||||
<ul>
|
||||
<li><a href="http://packages.debian.org/stable/editors/nano.html">stable</a></li>
|
||||
<li><a href="http://packages.debian.org/testing/editors/nano.html">testing</a></li>
|
||||
<li><a href="http://packages.debian.org/unstable/editors/nano.html">unstable</a></li>
|
||||
<li><a href="http://packages.debian.org/stable/editors/nano">stable</a></li>
|
||||
<li><a href="http://packages.debian.org/testing/editors/nano">testing</a></li>
|
||||
<li><a href="http://packages.debian.org/unstable/editors/nano">unstable</a></li>
|
||||
</ul>
|
||||
<p>You can also have a look at the <a href="ftp://ftp.debian.org/debian/pool/main/n/nano/">Package Pool</a> to see all the available binary and source packages.</p>
|
||||
<p>Note that versions < 0.9.10 are probably not for those wanting to get serious work done, so if you are using Debian 2.2, check that you have updated to 2.2r3, which comes with nano 0.9.23. If you're tracking unstable, you probably have the newest version already.</p></blockquote>
|
||||
</blockquote>
|
||||
<h2><a name="2.4"></a>2.4. By subversion (for the brave).</h2>
|
||||
<blockquote><p>For the 'bleeding edge' current version of nano, you can use subversion to download the current source code. <b>Note:</b> believe it or not, by downloading code that has not yet stabilized into an official release, there could quite possibly be bugs, in fact the code may not even compile! Anyway, see <a href="http://svn.savannah.gnu.org/viewvc/trunk/nano/README.SVN?root=nano&view=markup">the nano SVN document</a> for info on anonymous SVN access to the nano source.</p></blockquote>
|
||||
<hr width="100%">
|
||||
@@ -122,10 +119,8 @@
|
||||
<blockquote><p>It's simple really! As root, type <b>rpm -Uvh nano-x.y.z-1.i386.rpm</b> if you have a RedHat-ish system or <b>dpkg -i nano_x.y.z-1.deb</b> if you have a Debian-ish system, where <b>x.y.z</b> is the release of nano. There are other programs to install packages, and if you wish to use those, knock yourself out.</p></blockquote>
|
||||
<h2><a name="3.2"></a>3.2. Compiling from source: WHAT THE HECK DO I DO NOW?</h2>
|
||||
<blockquote><p>Okay, take a deep breath, this really isn't hard. Unpack the nano source with a command like:</p>
|
||||
<p><b>tar -zxvf nano-x.y.z.tar.gz</b></p>
|
||||
<p>If you get error messages about the -z option, try this:</p>
|
||||
<p><b>gzip -dc nano-x.y.z.tar.gz | tar xvf -</b></p>
|
||||
<p>(again, where x.y.z is the version number in question). Then you need to run configure with any options you might want (if any).</p>
|
||||
<p><b>tar -xvf nano-x.y.z.tar.gz</b></p>
|
||||
<p>Then you need to run <b>configure</b> with any options you might want (if any).</p>
|
||||
<p>The average case is this:</p>
|
||||
<p><b>cd nano-x.y.z/</b><br>
|
||||
<b>./configure</b><br>
|
||||
@@ -135,73 +130,67 @@
|
||||
<blockquote><p>Well, that's what the <b>configure</b> script defaults to. If you wish to change this, simply do this:</p>
|
||||
<p><b>./configure --prefix=/usr</b></p>
|
||||
<p>to put nano into /usr/bin when you run <b>make install</b>.</p></blockquote>
|
||||
<h2><a name="3.4"></a>3.4. I get errors about 'bindtextdomain', 'gettext', and/or 'gettextdomain'. What can I do about it?</h2>
|
||||
<blockquote><p>Try doing a <b>./configure --with-included-gettext</b> and see if that solves your problem. You may need to do a <b>make clean; make</b> to get it to work fully.</p></blockquote>
|
||||
<h2><a name="3.5"></a>3.5. nano should automatically run strip on the binary when installing it!</h2>
|
||||
<blockquote><p>Actually, it does, but you have to use <b>make install-strip</b>. The default make install does not, and will not, run strip automatically.</p></blockquote>
|
||||
<h2><a name="3.6"></a>3.6. How can I make the executable smaller? This is too bloated!</h2>
|
||||
<blockquote><p>Actually, there are several parts of the editor that can be disabled. You can pass arguments to the <b>configure</b> script that disable certain features. Here's a brief list:</p>
|
||||
<pre>
|
||||
<b>--disable-tabcomp</b> Disable tab completion functions
|
||||
<b>--disable-justify</b> Disable justify/unjustify functions
|
||||
<b>--disable-speller</b> Disable spell checker functions
|
||||
<b>--disable-help</b> Disable help functions
|
||||
<b>--disable-browser</b> Disable built-in file browser
|
||||
<b>--disable-wrapping</b> Disable all wrapping of text (and -w flag)
|
||||
<b>--disable-color</b> Disable color and syntax highlighting
|
||||
<b>--disable-extra</b> Disable extra features, currently only an easter egg
|
||||
<b>--disable-help</b> Disable help functions
|
||||
<b>--disable-justify</b> Disable justify/unjustify functions
|
||||
<b>--disable-mouse</b> Disable mouse support (and -m flag)
|
||||
<b>--disable-operatingdir</b> Disable setting of operating directory</pre>
|
||||
<p>There's also the <b>--enable-tiny</b> option which disables everything above, as well as some larger chunks of the program (like the marker code that you use Control-^ to select with). Also, if you know you aren't going to be using other languages you can use <b>--disable-nls</b> to disable internationalization and save a few K to a few dozen K depending on if you have locale support on your system. And finally there's always good old <b>strip</b> to strip all debugging code and code that exists in libraries on your system.</p>
|
||||
<p>If, on the other hand, you can't live without bells and whistles, you could try:</p>
|
||||
<pre>
|
||||
<b>--enable-extra</b> Enable extra features, currently only easter eggs
|
||||
<b>--enable-nanorc</b> Enable use of .nanorc files
|
||||
<b>--enable-color</b> Enable color and syntax highlighting
|
||||
<b>--enable-multibuffer</b> Enable having multiple file buffers open
|
||||
<b>--enable-all</b> Enable all of the above features
|
||||
<b>--disable-wrapping-as-root</b>
|
||||
Disable text wrapping by default when the user is
|
||||
root</pre></blockquote>
|
||||
<b>--disable-multibuffer</b> Disable having multiple file buffers open
|
||||
<b>--disable-nanorc</b> Disable the use of .nanorc files
|
||||
<b>--disable-operatingdir</b> Disable setting of operating directory
|
||||
<b>--disable-speller</b> Disable spell checker functions
|
||||
<b>--disable-tabcomp</b> Disable tab completion functions
|
||||
<b>--disable-wrapping</b> Disable all wrapping of text (and -w flag)</pre>
|
||||
<p>There's also the <b>--enable-tiny</b> option which disables everything above, as well as some larger chunks of the program (like the marker code that you use with Control-^ to select text). Also, if you know you aren't going to be using other languages you can use <b>--disable-nls</b> to disable internationalization and save a few K to a few dozen K depending on if you have locale support on your system. And finally there's always good old <b>strip</b> to strip all debugging code and code that exists in libraries on your system.</p>
|
||||
<p>With <b>--disable-wrapping-as-root</b> you can disable any hard-wrapping by default when the user is root, useful to prevent accidentally changing long lines in system configuration files.</p>
|
||||
</blockquote>
|
||||
<h2><a name="3.7"></a>3.7. Tell me more about this multibuffer stuff!</h2>
|
||||
<blockquote><p>To use multiple file buffers, you must be using nano 1.1.0 or newer, and you must have configured nano with <b>--enable-multibuffer</b> (use nano -V to check). Then when you want to enable inserting a file into its own buffer instead of into the current file, just hit <b>Meta-F</b>, then insert the file as normal with <b>^R</b>. If you always want files to be loaded into their own buffers, use the <b>--multibuffer</b> or <b>-F</b> flag when you invoke nano.</p>
|
||||
<blockquote><p>To use multiple file buffers, you must be using nano 1.1.0 or newer, and you must not have configured it with <b>--disable-multibuffer</b> nor with <b>--enable-tiny</b> (use <b>nano -V</b> to check the compilation options). Then when you want to insert a file into its own buffer instead of into the current file, just hit <b>Meta-F</b>, then insert the file as normal with <b>^R</b>. If you always want files to be loaded into their own buffers, use the <b>--multibuffer</b> or <b>-F</b> flag when you invoke nano.</p>
|
||||
<p>You can move between the buffers you have open with the <b>Meta-<</b> and <b>Meta-></b> keys, or more easily with <b>Meta-,</b> and <b>Meta-.</b> (clear as mud, right? =-). When you have more than one file buffer open, the ^X shortcut will say "Close", instead of the normal "Exit" when only one buffer is open.</p></blockquote>
|
||||
<h2><a name="3.8"></a>3.8. Tell me more about this verbatim input stuff!</h2>
|
||||
<blockquote><p>To use verbatim input, you must be using nano 1.3.1 or newer. When you want to insert a literal character into the file you're editing, such as a control character that nano usually treats as a command, first press <b>Meta-V</b>. (If you're not at a prompt, you'll get the message "Verbatim Input".) Then press the key(s) that generate the character you want.</p>
|
||||
<p>Alternatively, if you've enabled Unicode support (see section <a href="#5.3">5.3</a>), you can press <b>Meta-V</b> and then type a six-digit hexadecimal code from 000000 to 10FFFF (case-insensitive), and the character with the corresponding value will be inserted instead. The prompt will change to "Unicode Input" when you do this.</p></blockquote>
|
||||
<blockquote><p>To use verbatim input, you must be using nano 1.3.1 or newer. When you want to insert a literal character into the file you're editing, such as a control character that nano usually treats as a command, first press <b>Meta-V</b> (if you're not at a prompt, you'll get the message "Verbatim Input"), then press the key(s) that generate the character you want.</p>
|
||||
<p>Alternatively, if you've enabled Unicode support (see section <a href="#5.3">5.3</a>), you can press <b>Meta-V</b> and then type a six-digit hexadecimal code (from 000000 to 10FFFF, case-insensitive), and the character with the corresponding value will be inserted instead. The prompt will change to "Unicode Input" when you do this.</p></blockquote>
|
||||
<h2><a name="3.9"></a>3.9. How do I make a .nanorc file that nano will read when I start it?</h2>
|
||||
<blockquote><p>It's not hard at all! But, your version of nano must have been compiled with <b>--enable-nanorc</b>, and again must be version 1.1.12 or newer (use nano -V to check your version and compiled features). Then simply copy the <b>nanorc.sample</b> that came with the nano source or your nano package (most likely in /usr/doc/nano) to .nanorc in your home directory. If you didn't get one, the syntax is simple. Flags are turned on and off by using the word <b>set</b> and the getopt_long flag for the feature, for example "set nowrap" or "set suspend".</p></blockquote>
|
||||
<blockquote><p>It's not hard at all! But, your version of nano must not have been compiled with <b>--disable-nanorc</b>, and must be version 1.1.12 or newer (use nano -V to check your version and compiled features). Then simply copy the <b>nanorc.sample</b> that came with the nano source or your nano package (most likely in /usr/doc/nano) to .nanorc in your home directory. If you didn't get one, the syntax is simple. Flags are turned on and off by using the word <b>set</b> and the getopt_long flag for the feature, for example "set nowrap" or "set suspend".</p></blockquote>
|
||||
<h2><a name="3.9.1"></a>3.9. How about in Win32?</h2>
|
||||
<blockquote><p>If you're using the official nano .zip file and have extracted all the files, you should take the file nano.rc and place it somewhere on your Win32 system (for example if you have write permission to do so, at the top of C:\). Then you must create an Environment variable called HOME which points to the directory where you put nano.rc. In Windows XP, you can get to Environment variables by right-clicking "My Computer" either on the desktop or in the Start Menu, and selecting Properties. This should bring up the System Properties panel. Then click the Advanced Tab, and there should be a button called Environment Variables. Click that to bring up the Environment Variables section. Now, under User Variables you should be able to click the New button, and make a new Variables Name called HOME, with the Variable Value of whatever path you copied nano.rc into (just the directory name; don't add nano.rc onto the end).</p>
|
||||
<p>We're still working on documentatino for enabling synax highlighting on Win32; please bear with us</p>
|
||||
<p>Note that the nano.rc file must remain Unix formated in order for nano to unerstand it. In other words, you should use probably only use nano to edit its config file. Other programs like Wordpad and Notepad will either convert the file to DOS format when saving, and the latter does not even properly read Unix-formatted files to begin with.</p></blockquote>
|
||||
<p>We're still working on documentation for enabling synax highlighting on Win32; please bear with us.</p>
|
||||
<p>Note that the nano.rc file must remain Unix-formated in order for nano to understand it. In other words, you should probably use only nano to edit its config file. Other programs like Wordpad and Notepad will convert the file to DOS format when saving, and the latter does not even properly read Unix-formatted files to begin with.</p></blockquote>
|
||||
<hr width="100%">
|
||||
<h1><a name="4"></a>4. Running</h1>
|
||||
<h2><a name="4.1"></a>4.1. How do I open a file with a name beginning with '+' from the command line?</h2>
|
||||
<blockquote><p>If a command line option that begins with '+' is followed by another option, the former is always treated as a starting line and column number and the latter is always treated as a filename. If a command line option that begins with '+' isn't followed by another option, it's always treated as a filename. Examples:</p>
|
||||
<blockquote><p>If a command-line option that begins with '+' is followed by another option, the former is always treated as a starting line and column number, and the latter is always treated as a filename. If a command-line option that begins with '+' isn't followed by another option, it's always treated as a filename. Examples:</p>
|
||||
<p>To open '+filename.txt' starting on line 1: <b>nano +filename.txt</b><br>
|
||||
To open '+filename.txt' starting on line 10: <b>nano +10 +filename.txt</b><br>
|
||||
To open '+filename.txt' starting on line 1, column 20: <b>nano +,20 +filename.txt</b><br>
|
||||
To open '+filename.txt' starting on line 10, column 20: <b>nano +10,20 +filename.txt</b><br>
|
||||
To open '+filename.txt' starting on line 1 and 'filename.txt' starting on line 10 (if nano has been compiled with multibuffer support): <b>nano +1 +filename.txt +20 filename.txt</b></p></blockquote>
|
||||
To open '+filename.txt' starting on line 1 and 'filename.txt' starting on line 40 (if nano has been compiled with multibuffer support): <b>nano +1 +filename.txt +40 filename.txt</b></p></blockquote>
|
||||
<h2><a name="4.2"></a>4.2. Ack! My Backspace/Delete/Enter/Meta/double bucky key doesn't seem to work! What can I do?</h2>
|
||||
<blockquote><p>Try setting your $TERM variable to 'vt100'. nano doesn't yet support every term entry under the sun.</p>
|
||||
<p>Bourne shell users (bash and sh): <b>export TERM=vt100</b><br>
|
||||
C Shell users (tcsh and csh): <b>setenv TERM vt100</b></p></blockquote>
|
||||
<h2><a name="4.3"></a>4.3. Ack! My numeric keypad's keys don't work properly when NumLock is off! What can I do?</h2>
|
||||
<blockquote><p>You can use the <b>-K</b> or <b>--rebindkeypad</b> options on the command line, or add the line <b>set rebindkeypad</b> to your .nanorc. However, nano's mouse support won't work properly if you do any of these things.</p></blockquote>
|
||||
<blockquote><p>You can use the <b>-K</b> or <b>--rebindkeypad</b> option on the command line, or add the line <b>set rebindkeypad</b> to your .nanorc. However, nano's mouse support won't work properly if you do any of these things.</p></blockquote>
|
||||
<h2><a name="4.4"></a>4.4. Ack! When I hold down a Meta key combination for a while, the character of the held key gets inserted now and then. What gives?</h2>
|
||||
<blockquote><p>This is a bug in the terminal, not in nano. When a key is repeating faster than nano can process it, the keyboard buffer becomes full and starts dropping incoming keystrokes. Unfortunately, it doesn't just drop whole keystrokes; it can also drop parts of multibyte key combinations, resulting in nano's receiving a wrong key.</p></blockquote>
|
||||
<h2><a name="4.5"></a>4.5. How do I type the F13-F16 keys shown in the help browser? My keyboard only has F1-F12!</h2>
|
||||
<blockquote><p>It depends on the terminal type you're using. On some terminals, such as the FreeBSD console, xterm, konsole, and gnome-terminal, Shift-F1 to Shift-F4 will generate F13 to F16. On other terminals, such as the Linux console, rxvt, and Eterm, Shift-F3 to Shift-F6 will generate F13 to F16.</p></blockquote>
|
||||
<h2><a name="4.6"></a>4.6. nano crashes when I type <insert keystroke here>!</h2>
|
||||
<blockquote><p>If you aren't trying some bizarre keystroke combination with some bizarre $TERM entry, chances are you have found a bug. You are welcome to submit it to the <a href="mailto:nano-devel@gnu.org">nano-devel</a> list or to <a href="mailto:nano@nano-editor.org">nano@nano-editor.org</a>.</p></blockquote>
|
||||
<blockquote><p>If you aren't trying some bizarre keystroke combination with some bizarre $TERM entry, chances are you have found a bug. You are welcome to submit it to the <a href="mailto:nano-devel@gnu.org">nano-devel</a> list or in the <a href="https://savannah.gnu.org/bugs/?group=nano">bug database</a> on Savannah.</p></blockquote>
|
||||
<h2><a name="4.7"></a>4.7. nano crashes when I resize my window. How can I fix that?</h2>
|
||||
<blockquote><p>Older versions of nano had this problem, please upgrade to a newer version (at least 0.9.9 would be great, 0.9.12 is recommended).</p></blockquote>
|
||||
<blockquote><p>Older versions of nano had this problem, please upgrade to a newer version (at least 0.9.9, but 2.2.6 is recommended).</p></blockquote>
|
||||
<h2><a name="4.8"></a>4.8. [version 1.3.12 and later] I'm using glibc 2.2.3, and nano crashes when I use color support or do regular expression searches. How can I fix that?</h2>
|
||||
<blockquote><p>It's a bug in glibc 2.2.3. You should upgrade to at least glibc 2.2.4.</p></blockquote>
|
||||
<h2><a name="4.9"></a>4.9. [version 1.1.12 and earlier] Why does nano show ^\ in the shortcut list instead of ^J?</h2>
|
||||
<blockquote><p>The help (^G) and justify (^J) function were among the last to be written. To show the improvements that nano had over Pico (go to line # and replace), ^_ and ^\ were put on the shortcut list. Later, ^G came back in place of ^_ as it proved to be very valuable for new Unix users. If you use the <b>-p</b> option to nano (or hit Meta-P) you will get the same shortcuts at the bottom as Pico.</p></blockquote>
|
||||
<blockquote><p>The help (^G) and justify (^J) functions were among the last to be written. To show the improvements that nano had over Pico (go to line number, and replace), ^_ and ^\ were put on the shortcut list. Later, ^G came back in place of ^_ as it proved to be very valuable for new Unix users.</p></blockquote>
|
||||
<h2><a name="4.10a"></a>4.10a. [version 1.1.12 and earlier] When I type in a search string, the string I last searched for is already in front of my cursor! What happened?!</h2>
|
||||
<blockquote><p>In nano version 0.9.20, the default is to have a completely consistent user interface across all user input functions. This means that regardless of whether you're being asked for a filename to insert or write, or a string to search for, the previous value is already inserted before the cursor. If you prefer the old behavior, use the Pico emulation mode (-p or --pico) or just hit Meta-P while in nano (see the ^G help text for more details).</p></blockquote>
|
||||
<blockquote><p>Since nano version 0.9.20, the default was to have a completely consistent user interface across all user input functions. This means that regardless of whether you're being asked for a filename to insert or write, or a string to search for, the previous value is already inserted before the cursor.</p></blockquote>
|
||||
<h2><a name="4.10b"></a>4.10b. [version 1.1.99pre1 and later] Hey, the search string behavior has reverted, it's now like Pico, what happened to the consistency?</h2>
|
||||
<blockquote><p>It was decided that consistency was nice, but people are used to Pico's inconsistent behavior. Also, in version 1.1.99pre1, search and replace history was introduced. If you wish to edit your previous search/replace entry (or any previous entry), you can do so by hitting the up arrow to cycle through your history. This method allows the best of both worlds: You don't need to erase the previous string if you want to enter a new one, but you can with one keystroke recall previous entries for editing. Therefore there is now no "Pico mode", nano is and has always been a Pico <b>clone</b>, and clones by default should be compatible.</p></blockquote>
|
||||
<h2><a name="4.11"></a>4.11. How do I make nano my default editor (in Pine, mutt, etc.)?</h2>
|
||||
@@ -209,7 +198,7 @@
|
||||
<p><b>export EDITOR=/usr/local/bin/nano</b></p>
|
||||
<p>or, if you use tcsh, put this in your <b>.cshrc</b> file:</p>
|
||||
<p><b>setenv EDITOR /usr/local/bin/nano</b></p>
|
||||
<p>Change /usr/local/bin/nano to wherever nano is installed on your system. Type "which nano" to find out. This will not take effect until the next time you login. So log out and back in again.</p>
|
||||
<p>Change /usr/local/bin/nano to wherever nano is installed on your system. Type "which nano" to find out. This will not take effect until the next time you log in. So log out and back in again.</p>
|
||||
<p>Then, on top of that, if you use Pine, you must go into setup (type <b>S</b> at the main menu), and then configure (type <b>C</b>). Hit Enter on the lines that say:</p>
|
||||
<p><b>[ ] enable-alternate-editor-cmd</b><br>
|
||||
<b>[ ] enable-alternate-editor-implicitly</b></p>
|
||||
@@ -218,24 +207,24 @@
|
||||
<p><b>my_hdr X-Composer: nano x.y.z</b></p>
|
||||
<p>Again, replace x.y.z with the version of nano you use.</p></blockquote>
|
||||
<h2><a name="4.12"></a>4.12. I've compiled nano with color support, but I don't see any color when I run it!</h2>
|
||||
<blockquote><p>If you want nano to actually use color, you have to specify the color configurations you want it to use in your .nanorc. Some example configurations are in the <b>nanorc.sample</b> that comes with the nano source or your nano package. See Section <a href="#3.9">3.9</a>.</p></blockquote>
|
||||
<blockquote><p>If you want nano to actually use color, you have to specify the color configurations you want it to use in your .nanorc. Several example configurations are in the <b>doc/syntax</b> subdirectory of the nano source, which are normally installed to <b>/usr/local/share/nano</b>. To enable all of them, uncomment the line <b># include "/usr/local/share/nano/*.nanorc"</b> in your nanorc. See also section <a href="#3.9">3.9</a>.</p></blockquote>
|
||||
<h2><a name="4.13"></a>4.13. How do I select text for or paste text from the clipboard in an X terminal when I'm running nano in one and nano's mouse support is turned on?</h2>
|
||||
<blockquote><p>Try holding down the Shift key and selecting or pasting the text as you normally would.</p></blockquote>
|
||||
<h2><a name="4.14"></a>4.14. When I paste text into a document, each line gets indented further than the last. Why does nano do this, and how can I avoid it?</h2>
|
||||
<blockquote><p>You have the autoindent feature turned on. Hit Meta-I to turn it off, paste your text, and then hit Meta-I again to turn it back on.</p></blockquote>
|
||||
<h2><a name="4.15"></a>4.15. On startup I get a message that says "Detected a legacy nano history file". Now other nano versionc can't find my search history!</h2>
|
||||
<blockquote><p>In nano 2.3.0, cursor position history was introduced, and both files now reside under a .nano directory in your home. Nano was trying to move this file into the new location so it could continue to use it. This means that if you try and use an earlier version of nano, it will be unable to see your previous search history. To fix this, run the following commands:<br>
|
||||
<h2><a name="4.15"></a>4.15. On startup I get a message that says "Detected a legacy nano history file". Now older nano versions can't find my search history!</h2>
|
||||
<blockquote><p>In nano 2.3.0, cursor-position history was introduced, and both history files now reside under a .nano directory in your home. nano was trying to move this file into the new location so it could continue to use it. This means that if you try and use an earlier version of nano, it will be unable to see your current search history. To fix this, run the following commands:<br>
|
||||
mv ~/.nano/search_history ~/.nano_history<br>
|
||||
ln -sf ~/.nano_history ~/.nano/search_history<br>
|
||||
</p></blockquote>
|
||||
<hr width="100%">
|
||||
<h1><a name="5"></a>5. Internationalization</h1>
|
||||
<h2><a name="5.1"></a>5.1. There's no translation for my language!</h2>
|
||||
<blockquote><p>On June of 2001, GNU nano entered the <a href="http://translationproject.org/html/welcome.html">Free Translation Project</a> and since then, translations should be managed from there.</p>
|
||||
<p>If there isn't a translation for your language, you could ask <a href="http://translationproject.org/team/">your language team</a> to translate nano, or better still, join your team and do it yourself. Joining a team is easy. You just need to ask the <a href="mailto:coordinator@translationproject.org">TP coordinator</a> to add you to your team, and send a <a href="http://translationproject.org/disclaim.txt">translation disclaimer to the FSF</a> (this is necessary as nano is an official GNU package, but it does <b>not</b> mean that you transfer the rights of your work to the FSF, it's just so the FSF can legally manage them).</p>
|
||||
<p>In any case, translating nano is very easy. Just grab the <b>nano.pot</b> file from the latest and greatest nano distribution (it's in the <b>po/</b> directory) and translate each line into your native language on the <b>msgstr</b> line. When you're done, you should send it to the TP's central po repository.</p></blockquote>
|
||||
<blockquote><p>On June of 2001, GNU nano entered the <a href="http://translationproject.org/html/welcome.html">Translation Project</a> and since then, translations should be managed from there.</p>
|
||||
<p>If there isn't a translation for your language, you could ask <a href="http://translationproject.org/team/">your language team</a> to translate nano, or better still, join that team and do it yourself. Joining a team is easy. You just need to ask the team leader to add you, and then send a <a href="http://translationproject.org/disclaim.txt">translation disclaimer to the FSF</a> (this is necessary as nano is an official GNU package, but it does <b>not</b> mean that you transfer the rights of your work to the FSF, it's just so the FSF can legally manage them).</p>
|
||||
<p>In any case, translating nano is very easy. Just grab the latest <b>nano.pot</b> file listed on <a href="http://translationproject.org/domain/nano.html">nano's page</a> at the TP, and translate each <b>msgid</b> line into your native language on the <b>msgstr</b> line. When you're done, you should send it to the TP's central po repository.</p></blockquote>
|
||||
<h2><a name="5.2"></a>5.2. I don't like the translation for <x> in my language. How can I fix it?</h2>
|
||||
<blockquote><p>The best way would probably be to e-mail the person listed in the <code>Last-Translator:</code> field in the <b><your_language>.po</b> file with your suggested corrections and they can make the changes reach the nano-devel list.</p></blockquote>
|
||||
<blockquote><p>The best way would probably be to send an e-mail to the team's mailing listed mentione in the <code>Language-Team:</code> field in the <b><your_language>.po</b> file with your suggested corrections, and then they can make the changes reach the nano-devel list.</p></blockquote>
|
||||
<h2><a name="5.3"></a>5.3. What is the status of Unicode support?</h2>
|
||||
<blockquote><p>In version 1.3.12 or later, Unicode should be usable. With your terminal, locale (LC_ALL and similar environment variables), and encoding configured to properly support UTF-8, you should be able to enter and save Unicode text.</p></blockquote>
|
||||
<hr width="100%">
|
||||
@@ -252,22 +241,23 @@ Of course, due to the license change you can now use the <A HREF="http://www.was
|
||||
<hr width="100%">
|
||||
<h1><a name="7"></a>7. Miscellaneous</h1>
|
||||
<h2><a name="7.1"></a>7.1. nano-related mailing lists.</h2>
|
||||
<blockquote><p>There are three mailing lists for nano hosted at <a href="http://savannah.gnu.org/">Savannah</a>, info-nano, help-nano and nano-devel. info-nano is a very low traffic list where new versions of nano are announced (surprise!). help-nano is for getting help with the editor without needing to hear all of the development issues surrounding it. nano-devel is a normally low, sometimes high traffic list for discussing the present and future development of nano. Here are links to where you can sign up for a given list:</p>
|
||||
<blockquote><p>There are three mailing lists for nano hosted at <a href="http://savannah.gnu.org/">Savannah</a>: info-nano, help-nano and nano-devel. info-nano is a very low traffic list where new versions of nano are announced (surprise!). help-nano is for getting help with the editor without needing to hear all of the development issues surrounding it. nano-devel is a normally low, sometimes high traffic list for discussing the present and future development of nano. Here are links to where you can sign up for a given list:</p>
|
||||
<p>info-nano - <a href="http://mail.gnu.org/mailman/listinfo/info-nano/">http://mail.gnu.org/mailman/listinfo/info-nano/</a><br>
|
||||
help-nano - <a href="http://mail.gnu.org/mailman/listinfo/help-nano/">http://mail.gnu.org/mailman/listinfo/help-nano/</a><br>
|
||||
nano-devel - <a href="http://mail.gnu.org/mailman/listinfo/nano-devel/">http://mail.gnu.org/mailman/listinfo/nano-devel/</a></p></blockquote>
|
||||
<h2><a name="7.2"></a>7.2. I want to send the development team a big load of cash (or just a thank you).</h2>
|
||||
<blockquote><p>That's fine. Send it <a href="mailto:nano-devel@gnu.org">our way</a>! Better yet, fix a <a href="http://www.nano-editor.org/dist/v2.2/BUGS">bug</a> in the program or implement a <a href="http://www.nano-editor.org/dist/v2.2/TODO">cool feature</a> and send us that instead (though cash is fine too).</p></blockquote>
|
||||
<blockquote><p>That's fine. Send it <a href="mailto:nano-devel@gnu.org">our way</a>! Better yet, fix a <a href="https://savannah.gnu.org/bugs/?group=nano">bug</a> in the program or implement a <a href="http://www.nano-editor.org/dist/v2.3/TODO">cool feature</a> and send us that instead (though cash is fine too).</p></blockquote>
|
||||
<h2><a name="7.3"></a>7.3. How do I submit a bug report or patch?</h2>
|
||||
<blockquote>
|
||||
<p>The best place to submit bugs is to the <A HREF="https://savannah.gnu.org/bugs/?group=nano">Savannah bug tracker</A> as you can check whether the bug you are submitting has already been submitted.
|
||||
<p>The best place to submit bugs is to the <a href="https://savannah.gnu.org/bugs/?group=nano">Savannah bug tracker</a> as you can check whether the bug you are submitting has already been submitted.
|
||||
<p>Please submit patches for nano via the <a href="https://savannah.gnu.org/patch/?group=nano">Savannah project's patch manager</a> for the nano project.</p></blockquote>
|
||||
<h2><a name="7.4"></a>7.4. How do I join the development team?</h2>
|
||||
<blockquote><p>The easiest way is to consistently send in good patches that add some needed functionality, fix a bug or two and/or make the program more optimized/efficient. Then ask nicely and you will probably be added to the Savannah development list and be given SVN write access after awhile. There is a lot of responsibility that goes along with being a team member, so don't think it's just something to add to your resume.</p></blockquote>
|
||||
<blockquote><p>The easiest way is to consistently send in good patches that add some needed functionality, fix a bug or two, and/or make the program more optimized/efficient. Then ask nicely and you will probably be added to the Savannah development list and be given SVN write access after a while. There is a lot of responsibility that goes along with being a team member, so don't think it's just something to add to your resume.</p></blockquote>
|
||||
<h2><a name="7.5"></a>7.5. Can I have write access to the subversion tree?</h2>
|
||||
<blockquote><p>Re-read Section <a href="#7.4">7.4</a> and you should know the answer.</p></blockquote>
|
||||
<h2><a name="8"></a>8. ChangeLog</h2>
|
||||
<blockquote><p>2009/11/30 - Update various bits for nano 2.2.x. (DLR)<br>
|
||||
<blockquote><p>2014/04/24 - A bunch of small fixes and updates. (Benno)<br>
|
||||
2009/11/30 - Update various bits for nano 2.2.x. (DLR)<br>
|
||||
2009/11/18 - Typo fix. (j.mader@gmail.com)<br>
|
||||
2008/03/16 - Update docs to refer to subversion instead of CVS, add more words about Alpine, and refer to Savannah for bugs and patches. (chrisa)<br>
|
||||
2007/12/21 - Update maintainer information. (DLR)<br>
|
||||
|
||||
@@ -1,26 +1,17 @@
|
||||
if USE_NLS
|
||||
SUBDIRS = fr
|
||||
else
|
||||
SUBDIRS =
|
||||
BUILT_SOURCES =
|
||||
|
||||
if USE_NLS
|
||||
SUBDIRS += fr
|
||||
endif
|
||||
|
||||
dist_man_MANS = nano.1 rnano.1
|
||||
html_pages = nano.1.html rnano.1.html
|
||||
|
||||
if USE_NANORC
|
||||
man_MANS = nano.1 nanorc.5 rnano.1
|
||||
if GROFF_HTML
|
||||
BUILT_SOURCES = nano.1.html nanorc.5.html rnano.1.html
|
||||
dist_man_MANS += nanorc.5
|
||||
html_pages += nanorc.5.html
|
||||
endif
|
||||
else
|
||||
man_MANS = nano.1 rnano.1
|
||||
if GROFF_HTML
|
||||
BUILT_SOURCES = nano.1.html rnano.1.html
|
||||
endif
|
||||
endif
|
||||
|
||||
nano_man_mans = nano.1 nanorc.5 rnano.1
|
||||
if GROFF_HTML
|
||||
htmlman_DATA = nano.1.html nanorc.5.html rnano.1.html
|
||||
htmlmandir = $(datadir)/nano/man-html
|
||||
nano_built_sources = nano.1.html nanorc.5.html rnano.1.html
|
||||
|
||||
nano.1.html: nano.1
|
||||
groff -t -mandoc -Thtml < $? > $@
|
||||
@@ -29,7 +20,9 @@ nanorc.5.html: nanorc.5
|
||||
rnano.1.html: rnano.1
|
||||
groff -t -mandoc -Thtml < $? > $@
|
||||
|
||||
EXTRA_DIST = $(nano_man_mans) $(nano_built_sources)
|
||||
else
|
||||
EXTRA_DIST = $(nano_man_mans)
|
||||
if GROFF_HTML
|
||||
BUILT_SOURCES += $(html_pages)
|
||||
dist_html_DATA = $(html_pages)
|
||||
endif
|
||||
|
||||
EXTRA_DIST = $(BUILT_SOURCES)
|
||||
|
||||
@@ -1,23 +1,15 @@
|
||||
mandir = @mandir@/fr
|
||||
htmldir = @htmldir@/fr
|
||||
|
||||
BUILT_SOURCES =
|
||||
|
||||
dist_man_MANS = nano.1 rnano.1
|
||||
html_pages = nano.1.html rnano.1.html
|
||||
|
||||
if USE_NANORC
|
||||
man_MANS = nano.1 nanorc.5 rnano.1
|
||||
if GROFF_HTML
|
||||
BUILT_SOURCES = nano.1.html nanorc.5.html rnano.1.html
|
||||
dist_man_MANS += nanorc.5
|
||||
html_pages += nanorc.5.html
|
||||
endif
|
||||
else
|
||||
man_MANS = nano.1 rnano.1
|
||||
if GROFF_HTML
|
||||
BUILT_SOURCES = nano.1.html rnano.1.html
|
||||
endif
|
||||
endif
|
||||
|
||||
nano_man_mans = nano.1 nanorc.5 rnano.1
|
||||
if GROFF_HTML
|
||||
htmlman_DATA = nano.1.html nanorc.5.html rnano.1.html
|
||||
htmlmandir = $(datadir)/nano/man-html/fr
|
||||
|
||||
nano_built_sources = nano.1.html nanorc.5.html rnano.1.html
|
||||
|
||||
nano.1.html: nano.1
|
||||
groff -t -mandoc -Thtml < $? > $@
|
||||
@@ -26,8 +18,9 @@ nanorc.5.html: nanorc.5
|
||||
rnano.1.html: rnano.1
|
||||
groff -t -mandoc -Thtml < $? > $@
|
||||
|
||||
EXTRA_DIST = $(nano_man_mans) $(nano_built_sources)
|
||||
else
|
||||
EXTRA_DIST = $(nano_man_mans)
|
||||
if GROFF_HTML
|
||||
BUILT_SOURCES += $(html_pages)
|
||||
dist_html_DATA = $(html_pages)
|
||||
endif
|
||||
|
||||
EXTRA_DIST = $(BUILT_SOURCES)
|
||||
|
||||
105
doc/man/nano.1
105
doc/man/nano.1
@@ -1,6 +1,6 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.\" Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
||||
.\" 2008, 2009 Free Software Foundation, Inc.
|
||||
.\" 2009, 2010, 2013, 2014 Free Software Foundation, Inc.
|
||||
.\"
|
||||
.\" This document is dual-licensed. You may distribute and/or modify it
|
||||
.\" under the terms of either of the following licenses:
|
||||
@@ -19,7 +19,7 @@
|
||||
.\" <http://www.gnu.org/licenses/>.
|
||||
.\"
|
||||
.\" $Id$
|
||||
.TH NANO 1 "version 2.2.0" "November 30, 2009"
|
||||
.TH NANO 1 "version 2.3.3" "April 2014"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
|
||||
@@ -28,30 +28,22 @@ nano \- Nano's ANOther editor, an enhanced free Pico clone
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B nano
|
||||
.I [OPTIONS]\ [[\+LINE,COLUMN]\ FILE]...
|
||||
.RI [ options "] [[\+" line , column "]\ " file "]..."
|
||||
.br
|
||||
|
||||
.SH DESCRIPTION
|
||||
This manual page briefly documents the \fBnano\fP command.
|
||||
.PP
|
||||
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
|
||||
.\" \fI<whatever>\fP escape sequences to invoke bold face and italics,
|
||||
.\" respectively.
|
||||
\fBnano\fP is a small, free and friendly editor which aims to replace
|
||||
Pico, the default editor included in the non-free Pine package. Rather
|
||||
than just copying Pico's look and feel, \fBnano\fP also implements some
|
||||
Pico, the default editor included in the non-free Pine package. On
|
||||
top of copying Pico's look and feel, \fBnano\fP also implements some
|
||||
missing (or disabled by default) features in Pico, such as "search and
|
||||
replace" and "go to line and column number".
|
||||
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \+\fILINE\fP,\fICOLUMN\fP
|
||||
Places cursor at line number \fILINE\fP and column number \fICOLUMN\fP
|
||||
.B \+\fIline\fP,\fIcolumn\fP
|
||||
Places the cursor on line number \fIline\fP and at column number \fIcolumn\fP
|
||||
(at least one of which must be specified) on startup, instead of the
|
||||
default of line 1, column 1.
|
||||
.TP
|
||||
.B \-?
|
||||
Same as \fB-h (\-\-help)\fP.
|
||||
default line 1, column 1.
|
||||
.TP
|
||||
.B \-A (\-\-smarthome)
|
||||
Make the Home key smarter. When Home is pressed anywhere but at the
|
||||
@@ -62,10 +54,10 @@ line.
|
||||
.TP
|
||||
.B \-B (\-\-backup)
|
||||
When saving a file, back up the previous version of it to the current
|
||||
filename suffixed with a ~.
|
||||
filename suffixed with a tilde (\fB~\fP).
|
||||
.TP
|
||||
.B \-C \fIdir\fP (\-\-backupdir=\fIdir\fP)
|
||||
Set the directory where \fBnano\fP puts unique backup files if file
|
||||
Set the directory where \fBnano\fP puts unique backup files, if file
|
||||
backups are enabled.
|
||||
.TP
|
||||
.B \-D (\-\-boldtext)
|
||||
@@ -77,6 +69,9 @@ Convert typed tabs to spaces.
|
||||
.B \-F (\-\-multibuffer)
|
||||
Enable multiple file buffers, if available.
|
||||
.TP
|
||||
.B \-G (\-\-locking)
|
||||
Enable vim-style file locking when editing files.
|
||||
.TP
|
||||
.B \-H (\-\-historylog)
|
||||
Log search and replace strings to \fI~/.nano_history\fP, so they can be
|
||||
retrieved in later sessions, if \fInanorc\fP support is available.
|
||||
@@ -99,6 +94,10 @@ Disable automatic conversion of files from DOS/Mac format.
|
||||
.B \-O (\-\-morespace)
|
||||
Use the blank line below the titlebar as extra editing space.
|
||||
.TP
|
||||
.B \-P (\-\-poslog)
|
||||
Log and later read back the location of the cursor and place it there
|
||||
again.
|
||||
.TP
|
||||
.B \-Q \fIstr\fP (\-\-quotestr=\fIstr\fP)
|
||||
Set the quoting string for justifying. The default is
|
||||
"\fI^([\ \\t]*[#:>\\|}])+\fP" if extended regular expression support is
|
||||
@@ -107,23 +106,23 @@ Tab.
|
||||
.TP
|
||||
.B \-R (\-\-restricted)
|
||||
Restricted mode: don't read or write to any file not specified on the
|
||||
command line; read any \fInanorc\fP files; allow suspending; allow a
|
||||
file to be appended to, prepended to, or saved under a different name if
|
||||
it already has one; or use backup files or spell checking. Also
|
||||
accessible by invoking \fBnano\fP with any name beginning with 'r' (e.g.
|
||||
"rnano").
|
||||
command line; don't read any \fInanorc\fP files; don't allow suspending;
|
||||
don't allow a file to be appended to, prepended to, or saved under a
|
||||
different name if it already has one; don't use backup files nor spell
|
||||
checking. This restricted mode is also accessible by invoking \fBnano\fP
|
||||
with any name beginning with 'r' (e.g. "rnano").
|
||||
.TP
|
||||
.B \-S (\-\-smooth)
|
||||
Enable smooth scrolling. Text will scroll line-by-line, instead of the
|
||||
usual chunk-by-chunk behavior.
|
||||
.TP
|
||||
.B \-T \fIcols\fP (\-\-tabsize=\fIcols\fP)
|
||||
Set the size (width) of a tab to \fIcols\fP columns. The value of
|
||||
\fIcols\fP must be greater than 0. The default value is 8.
|
||||
.B \-T \fInumber\fP (\-\-tabsize=\fInumber\fP)
|
||||
Set the size (width) of a tab to \fInumber\fP columns. The value of
|
||||
\fInumber\fP must be greater than 0. The default value is 8.
|
||||
.TP
|
||||
.B \-U (\-\-quickblank)
|
||||
Do quick statusbar blanking. Statusbar messages will disappear after 1
|
||||
keystroke instead of 25. Note that \fB-c\fP overrides this.
|
||||
keystroke instead of 25. Note that \fB\-c\fP overrides this.
|
||||
.TP
|
||||
.B \-V (\-\-version)
|
||||
Show the current version number and exit.
|
||||
@@ -137,7 +136,7 @@ Specify a specific syntax highlighting from the \fInanorc\fP to use, if
|
||||
available.
|
||||
.TP
|
||||
.B \-c (\-\-const)
|
||||
Constantly show the cursor position. Note that this overrides \fB-U\fP.
|
||||
Constantly show the cursor position. Note that this overrides \fB\-U\fP.
|
||||
.TP
|
||||
.B \-d (\-\-rebinddelete)
|
||||
Interpret the Delete key differently so that both Backspace and Delete
|
||||
@@ -145,14 +144,15 @@ work properly. You should only need to use this option if Backspace
|
||||
acts like Delete on your system.
|
||||
.TP
|
||||
.B \-h (\-\-help)
|
||||
Show a summary of command line options and exit.
|
||||
Show a summary of the available command-line options and exit.
|
||||
.TP
|
||||
.B \-i (\-\-autoindent)
|
||||
Indent new lines to the previous line's indentation. Useful when
|
||||
editing source code.
|
||||
.TP
|
||||
.B \-k (\-\-cut)
|
||||
Enable cut from cursor to end of line.
|
||||
Make the 'Cut Text' command (normally ^K) cut from the current cursor
|
||||
position to the end of the line, instead of cutting the entire line.
|
||||
.TP
|
||||
.B \-l (\-\-nofollow)
|
||||
If the file being edited is a symbolic link, replace the link with
|
||||
@@ -163,7 +163,15 @@ a new file instead of following it. Good for editing files in
|
||||
Enable mouse support, if available for your system. When enabled, mouse
|
||||
clicks can be used to place the cursor, set the mark (with a double
|
||||
click), and execute shortcuts. The mouse will work in the X Window
|
||||
System, and on the console when gpm is running.
|
||||
System, and on the console when gpm is running. Text can still be
|
||||
selected through dragging by holding down the Shift key.
|
||||
.TP
|
||||
.B \-n (\-\-noread)
|
||||
Treat any name given on the command line as a new file. This allows
|
||||
\fBnano\fR to write to named pipes: it will start with a blank buffer,
|
||||
and will write to the pipe when the user saves the "file". This way
|
||||
\fBnano\fR can be used as an editor in combination with for instance
|
||||
\fBgpg\fR without having to write sensitive data to disk first.
|
||||
.TP
|
||||
.B \-o \fIdir\fP (\-\-operatingdir=\fIdir\fP)
|
||||
Set operating directory. Makes \fBnano\fP set up something similar to a
|
||||
@@ -174,41 +182,46 @@ Preserve the XON and XOFF sequences (^Q and ^S) so they will be caught
|
||||
by the terminal.
|
||||
.TP
|
||||
.B \-q (\-\-quiet)
|
||||
Do not report errors in the \fInanorc\fP file and ask them to be
|
||||
Do not report errors in the \fInanorc\fP file nor ask them to be
|
||||
acknowledged by pressing Enter at startup.
|
||||
.TP
|
||||
.B \-r \fIcols\fP (\-\-fill=\fIcols\fP)
|
||||
Wrap lines at column \fIcols\fP. If this value is 0 or less, wrapping
|
||||
will occur at the width of the screen less \fIcols\fP columns, allowing
|
||||
.B \-r \fInumber\fP (\-\-fill=\fInumber\fP)
|
||||
Hard-wrap lines at column \fInumber\fP. If this value is 0 or less, wrapping
|
||||
will occur at the width of the screen less \fInumber\fP columns, allowing
|
||||
the wrap point to vary along with the width of the screen if the screen
|
||||
is resized. The default value is \-8.
|
||||
is resized. The default value is \-8. This option conflicts with
|
||||
.B \-w
|
||||
-- the last one given takes effect.
|
||||
.TP
|
||||
.B \-s \fIprog\fP (\-\-speller=\fIprog\fP)
|
||||
.B \-s \fIprogram\fP (\-\-speller=\fIprogram\fP)
|
||||
Enable alternative spell checker command.
|
||||
.TP
|
||||
.B \-t (\-\-tempfile)
|
||||
Always save changed buffer without prompting. Same as Pico's \fB-t\fP
|
||||
Always save changed buffer without prompting. Same as Pico's \fB\-t\fP
|
||||
option.
|
||||
.TP
|
||||
.B \-u (\-\-undo)
|
||||
Enable experimental generic-purpose undo code. By default, the undo and redo
|
||||
shortcuts are Meta-U and Meta-E, respectively.
|
||||
Enable the experimental generic-purpose undo/redo code. The default undo
|
||||
and redo shortcuts are Meta-U and Meta-E, respectively.
|
||||
.TP
|
||||
.B \-v (\-\-view)
|
||||
View file (read only) mode.
|
||||
View-file (read-only) mode.
|
||||
.TP
|
||||
.B \-w (\-\-nowrap)
|
||||
Disable wrapping of long lines.
|
||||
Disable the hard-wrapping of long lines. This option conflicts with
|
||||
.B \-r
|
||||
-- the last one given takes effect.
|
||||
.TP
|
||||
.B \-x (\-\-nohelp)
|
||||
Disable help screen at bottom of editor.
|
||||
Don't show the two help lines at the bottom of the screen.
|
||||
.TP
|
||||
.B \-z (\-\-suspend)
|
||||
Enable suspend ability.
|
||||
Enable the suspend ability.
|
||||
.TP
|
||||
.B \-$ (\-\-softwrap)
|
||||
Enable 'soft wrapping'. \fBnano\fP will attempt to display the entire
|
||||
contents of a line, even if it is longer than the screen width. Since
|
||||
Enable 'soft wrapping'. This will make \fBnano\fP attempt to display the
|
||||
entire contents of any line, even if it is longer than the screen width, by
|
||||
continuing it over multiple screen lines. Since
|
||||
\&'$' normally refers to a variable in the Unix shell, you should specify
|
||||
this option last when using other options (e.g. 'nano \-wS$') or pass it
|
||||
separately (e.g. 'nano \-wS \-$').
|
||||
|
||||
526
doc/man/nanorc.5
526
doc/man/nanorc.5
@@ -1,6 +1,6 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.\" Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
.\" Free Software Foundation, Inc.
|
||||
.\" Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
|
||||
.\" 2013, 2014 Free Software Foundation, Inc.
|
||||
.\"
|
||||
.\" This document is dual-licensed. You may distribute and/or modify it
|
||||
.\" under the terms of either of the following licenses:
|
||||
@@ -19,40 +19,33 @@
|
||||
.\" <http://www.gnu.org/licenses/>.
|
||||
.\"
|
||||
.\" $Id$
|
||||
.TH NANORC 5 "version 2.0.0" "August 23, 2007"
|
||||
.TH NANORC 5 "version 2.3.3" "May 2014"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
.SH NAME
|
||||
nanorc \- GNU nano's rcfile
|
||||
.SH DESCRIPTION
|
||||
This manual page briefly documents GNU \fBnano\fP's rcfile.
|
||||
.PP
|
||||
\fBnano\fP is a small, free and friendly editor which aims to replace
|
||||
Pico, the default editor included in the non-free Pine package. Rather
|
||||
than just copying Pico's look and feel, \fBnano\fP also implements some
|
||||
missing (or disabled by default) features in Pico, such as "search and
|
||||
replace" and "go to line and column number".
|
||||
.PP
|
||||
The \fInanorc\fP file contains the default settings for \fBnano\fP. It
|
||||
should not be in DOS or Mac format. During startup, \fBnano\fP will
|
||||
first read its system-wide settings from \fISYSCONFDIR/nanorc\fP, and
|
||||
then user-specific settings from \fI~/.nanorc\fP.
|
||||
The \fInanorc\fP file contains the default settings for \fBnano\fP, a
|
||||
small and friendly editor. The file should be in Unix format, not in
|
||||
DOS or Mac format. During startup, \fBnano\fP will first read the
|
||||
system-wide settings, from \fBSYSCONFDIR/nanorc\fP, and then the
|
||||
user-specific settings, from \fB~/.nanorc\fP.
|
||||
|
||||
.SH OPTIONS
|
||||
The configuration file accepts a series of \fBset\fP and \fBunset\fP
|
||||
commands, which can be used to configure nano on startup without using
|
||||
the command line options. Additionally, the \fBsyntax\fP, \fBcolor\fP,
|
||||
and \fBicolor\fP keywords are used to define syntax highlighting rules
|
||||
for different text patterns. \fBnano\fP will read one command per line.
|
||||
command-line options. Additionally, there are some commands to define
|
||||
syntax highlighting and to rebind keys -- see the two separate sections
|
||||
on those. \fBnano\fP reads one command per line.
|
||||
|
||||
Options in \fInanorc\fP files take precedence over nano's defaults, and
|
||||
command line options override \fInanorc\fP settings. Also, options are
|
||||
command-line options override \fInanorc\fP settings. Also, options are
|
||||
unset by default, except for those that take arguments.
|
||||
|
||||
Quotes inside string parameters don't have to be escaped with
|
||||
backslashes. The last double quote in the string will be treated as its
|
||||
end. For example, for the \fBbrackets\fP option, "\fI"')>]}\fP" will
|
||||
match \fI"\fP, \fI'\fP, \fI)\fP, \fI>\fP, \fI]\fP, and \fI}\fP.
|
||||
end. For example, for the \fBbrackets\fP option, "\fB"')>]}\fP" will
|
||||
match \fB"\fP, \fB'\fP, \fB)\fP, \fB>\fP, \fB]\fP, and \fB}\fP.
|
||||
|
||||
The supported commands and arguments are:
|
||||
|
||||
@@ -66,47 +59,62 @@ NOT enable this option unless you are sure you need it.
|
||||
Use auto-indentation.
|
||||
.TP
|
||||
.B set/unset backup
|
||||
Create backup files in \fIfilename~\fP.
|
||||
Create backup files by adding a tilde (\fB~\fP) to each file's name.
|
||||
.TP
|
||||
.B set backupdir "\fIdirectory\fP"
|
||||
Set the directory where \fBnano\fP puts unique backup files if file
|
||||
Set the directory where \fBnano\fP puts unique backup files, if file
|
||||
backups are enabled.
|
||||
.TP
|
||||
.B set/unset backwards
|
||||
Do backwards searches by default.
|
||||
.TP
|
||||
.B set/unset boldtext
|
||||
Use bold text instead of reverse video text.
|
||||
Use bold instead of reverse video for the titlebar, statusbar, key combos,
|
||||
and selected text. This can be overridden for the first three by setting
|
||||
the options \fBtitlecolor\fP, \fBstatuscolor\fP, and \fBkeycolor\fP.
|
||||
.TP
|
||||
.B set brackets "\fIstring\fP"
|
||||
Set the characters treated as closing brackets when justifying
|
||||
paragraphs. They cannot contain blank characters. Only closing
|
||||
punctuation, optionally followed by closing brackets, can end sentences.
|
||||
The default value is "\fI"')>]}\fP".
|
||||
paragraphs. This may not include blank characters. Only closing
|
||||
punctuation (see \fBpunct\fP), optionally followed by the specified
|
||||
closing brackets, can end sentences. The default value is "\fB"')>]}\fP".
|
||||
.TP
|
||||
.B set/unset casesensitive
|
||||
Do case sensitive searches by default.
|
||||
Do case-sensitive searches by default.
|
||||
.TP
|
||||
.B set/unset const
|
||||
Constantly display the cursor position in the status bar.
|
||||
.TP
|
||||
.B set/unset cut
|
||||
Use cut to end of line by default.
|
||||
Use cut-to-end-of-line by default, instead of cutting the whole line.
|
||||
.TP
|
||||
.B set fill \fIn\fP
|
||||
Wrap lines at column number \fIn\fP. If \fIn\fP is 0 or less, the
|
||||
Hard-wrap lines at column number \fIn\fP. If \fIn\fP is 0 or less, the
|
||||
maximum line length will be the screen width less \fIn\fP columns. The
|
||||
default value is \-8.
|
||||
.TP
|
||||
.B set functioncolor \fIfgcolor\fR,\fIbgcolor\fR
|
||||
Specify the color combination to use for the function descriptions
|
||||
in the two help lines at the bottom of the screen.
|
||||
See \fBset titlecolor\fR for more details.
|
||||
.TP
|
||||
.B set/unset historylog
|
||||
Enable \fI~/.nano_history\fP for saving and reading search/replace
|
||||
strings.
|
||||
Enable the use of \fB~/.nano_history\fP for saving and reading
|
||||
search/replace strings.
|
||||
.TP
|
||||
.B set keycolor \fIfgcolor\fR,\fIbgcolor\fR
|
||||
Specify the color combination to use for the shortcut key combos
|
||||
in the two help lines at the bottom of the screen.
|
||||
See \fBset titlecolor\fR for more details.
|
||||
.TP
|
||||
.B set/unset locking
|
||||
Enable vim-style lock-files for when editing files.
|
||||
.TP
|
||||
.B set matchbrackets "\fIstring\fP"
|
||||
Set the opening and closing brackets that can be found by bracket
|
||||
searches. They cannot contain blank characters. The former set must
|
||||
come before the latter set, and both must be in the same order. The
|
||||
default value is "\fI(<[{)>]}\fP".
|
||||
searches. This may not include blank characters. The opening set must
|
||||
come before the closing set, and the two sets must be in the same order.
|
||||
The default value is "\fB(<[{)>]}\fP".
|
||||
.TP
|
||||
.B set/unset morespace
|
||||
Use the blank line below the titlebar as extra editing space.
|
||||
@@ -115,7 +123,8 @@ Use the blank line below the titlebar as extra editing space.
|
||||
Enable mouse support, if available for your system. When enabled, mouse
|
||||
clicks can be used to place the cursor, set the mark (with a double
|
||||
click), and execute shortcuts. The mouse will work in the X Window
|
||||
System, and on the console when gpm is running.
|
||||
System, and on the console when gpm is running. Text can still be
|
||||
selected through dragging by holding down the Shift key.
|
||||
.TP
|
||||
.B set/unset multibuffer
|
||||
Allow inserting files into their own buffers.
|
||||
@@ -127,13 +136,13 @@ Don't convert files from DOS/Mac format.
|
||||
Don't follow symlinks when writing files.
|
||||
.TP
|
||||
.B set/unset nohelp
|
||||
Don't display the help lists at the bottom of the screen.
|
||||
Don't display the two help lines at the bottom of the screen.
|
||||
.TP
|
||||
.B set/unset nonewlines
|
||||
Don't add newlines to the ends of files.
|
||||
Don't automatically add a newline to the ends of files.
|
||||
.TP
|
||||
.B set/unset nowrap
|
||||
Don't wrap text at all.
|
||||
Don't hard-wrap text at all.
|
||||
.TP
|
||||
.B set operatingdir "\fIdirectory\fP"
|
||||
\fBnano\fP will only read and write files inside \fIdirectory\fP and its
|
||||
@@ -141,30 +150,33 @@ subdirectories. Also, the current directory is changed to here, so
|
||||
files are inserted from this directory. By default, the operating
|
||||
directory feature is turned off.
|
||||
.TP
|
||||
.B set/unset poslog
|
||||
Save the cursor position of files between editing sessions.
|
||||
.TP
|
||||
.B set/unset preserve
|
||||
Preserve the XON and XOFF keys (^Q and ^S).
|
||||
.TP
|
||||
.B set punct "\fIstring\fP"
|
||||
Set the characters treated as closing punctuation when justifying
|
||||
paragraphs. They cannot contain blank characters. Only closing
|
||||
punctuation, optionally followed by closing brackets, can end sentences.
|
||||
The default value is "\fI!.?\fP".
|
||||
.TP
|
||||
.B set/unset quiet
|
||||
\fBnano\fP will not report errors in the \fInanorc\fP file and ask them
|
||||
to be acknowledged by pressing enter at startup. If this is used it
|
||||
should be placed at the top of the file to be fully effective.
|
||||
paragraphs. This may not include blank characters. Only the
|
||||
specfified closing punctuation, optionally followed by closing brackets
|
||||
(see \fBbrackets\fP), can end sentences. The default value is "\fB!.?\fP".
|
||||
.TP
|
||||
.B set/unset quickblank
|
||||
Do quick statusbar blanking. Statusbar messages will disappear after 1
|
||||
keystroke instead of 25.
|
||||
.TP
|
||||
.B set/unset quiet
|
||||
\fBnano\fP will not report errors in the \fInanorc\fP file nor ask them
|
||||
to be acknowledged by pressing Enter at startup. If this is used it
|
||||
should be placed at the top of the file to be fully effective.
|
||||
.TP
|
||||
.B set quotestr "\fIstring\fP"
|
||||
The email-quote string, used to justify email-quoted paragraphs. This
|
||||
is an extended regular expression if your system supports them,
|
||||
otherwise a literal string. The default value is
|
||||
"\fI^([\ \\t]*[#:>\\|}])+\fP" if you have extended regular expression
|
||||
support, or "\fI>\ \fP" otherwise. Note that '\\t' stands for a literal
|
||||
"\fB^([\ \\t]*[#:>\\|}])+\fP" if you have extended regular expression
|
||||
support, and "\fB>\ \fP" otherwise. Note that '\\t' stands for a literal
|
||||
Tab character.
|
||||
.TP
|
||||
.B set/unset rebinddelete
|
||||
@@ -180,9 +192,6 @@ won't work properly with this option enabled.
|
||||
.B set/unset regexp
|
||||
Do extended regular expression searches by default.
|
||||
.TP
|
||||
.B set/unset poslog
|
||||
Save the cursor position of files between editing sessions.
|
||||
.TP
|
||||
.B set/unset smarthome
|
||||
Make the Home key smarter. When Home is pressed anywhere but at the
|
||||
very beginning of non-whitespace characters on a line, the cursor will
|
||||
@@ -194,12 +203,16 @@ line.
|
||||
Use smooth scrolling by default.
|
||||
.TP
|
||||
.B set/unset softwrap
|
||||
Enable soft line wrapping for easier viewing of very long lones.
|
||||
Enable soft line wrapping for easier viewing of very long lines.
|
||||
.TP
|
||||
.B set speller "\fIspellprog\fP"
|
||||
Use spelling checker \fIspellprog\fP instead of the built-in one, which
|
||||
calls \fIspell\fP.
|
||||
.TP
|
||||
.B set statuscolor \fIfgcolor\fR,\fIbgcolor\fR
|
||||
Specify the color combination to use for the statusbar.
|
||||
See \fBset titlecolor\fR for more details.
|
||||
.TP
|
||||
.B set/unset suspend
|
||||
Allow \fBnano\fP to be suspended.
|
||||
.TP
|
||||
@@ -213,57 +226,76 @@ Convert typed tabs to spaces.
|
||||
.B set/unset tempfile
|
||||
Save automatically on exit, don't prompt.
|
||||
.TP
|
||||
.B set titlecolor \fIfgcolor\fR,\fIbgcolor\fR
|
||||
Specify the color combination to use for the titlebar.
|
||||
Valid color names for foreground and background are:
|
||||
.BR white , \ black , \ red , \ blue , \ green , \ yellow , \ magenta ", and " cyan .
|
||||
And either "\fIfgcolor\fR" or ",\fIbgcolor\fR" may be left out.
|
||||
.TP
|
||||
.B set/unset undo
|
||||
Enable experimental generic-purpose undo code.
|
||||
Enable the experimental generic-purpose undo/redo code.
|
||||
.TP
|
||||
.B set/unset view
|
||||
Disallow file modification.
|
||||
.TP
|
||||
.B set/unset softwrap
|
||||
Enable soft line wrapping for easier viewing of very long lones.
|
||||
.TP
|
||||
.B set whitespace "\fIstring\fP"
|
||||
Set the two characters used to display the first characters of tabs and
|
||||
Set the two characters used to indicate the presence of tabs and
|
||||
spaces. They must be single-column characters.
|
||||
.TP
|
||||
.B set/unset wordbounds
|
||||
Detect word boundaries more accurately by treating punctuation
|
||||
characters as parts of words.
|
||||
|
||||
.SH SYNTAX HIGHLIGHTING
|
||||
Coloring the different syntactic elements of a file
|
||||
can be defined via the following commands:
|
||||
.TP
|
||||
.B syntax "\fIstr\fP" ["\fIfileregex\fP" ... ]
|
||||
.BR syntax " ""\fIstr\fR"" [""\fIfileregex\fR"" ...]"
|
||||
Defines a syntax named \fIstr\fP which can be activated via the
|
||||
\-Y/\-\-syntax command line option, or will be automatically activated if
|
||||
.BR \-Y / \-\-syntax
|
||||
command-line option, or will be automatically activated if
|
||||
the current filename matches the extended regular expression
|
||||
\fIfileregex\fP. All following \fBcolor\fP and \fBicolor\fP statements
|
||||
will apply to \fIsyntax\fP until a new syntax is defined.
|
||||
will apply to this \fIstr\fP syntax until a new syntax is defined.
|
||||
|
||||
The \fInone\fP syntax is reserved; specifying it on the command line is
|
||||
the same as not having a syntax at all. The \fIdefault\fP syntax is
|
||||
The \fBnone\fP syntax is reserved; specifying it on the command line is
|
||||
the same as not having a syntax at all. The \fBdefault\fP syntax is
|
||||
special: it takes no \fIfileregex\fP, and applies to files that don't
|
||||
match any other syntax's \fIfileregex\fP.
|
||||
.TP
|
||||
.B magic ["\fIregex\fP" ... ]
|
||||
.BI linter " program " \fR[ "arg " \fR...]
|
||||
For the currently defined syntax, use the given \fIprogram\fR
|
||||
to invoke the linter (this overrides the speller function when
|
||||
defined).
|
||||
.TP
|
||||
.BR header " [""\fIregex\fR"" ...]
|
||||
For the currently defined syntax, add one or more regexes which will
|
||||
be compared against the very first line of the file to be edited,
|
||||
to determine whether this syntax should be used for that file.
|
||||
.TP
|
||||
.BR magic " [""\fIregex\fR"" ...]
|
||||
For the currently defined syntax, add one or more regexes which
|
||||
will be compared against the \fBmagic\fP database when attempting
|
||||
to determine which highlighting rules to use for a given file. This
|
||||
will be compared against the result of querying the \fBmagic\fP
|
||||
database about the file to be edited, to determine whether this
|
||||
syntax should be used for that file. This
|
||||
functionality only works when \fBlibmagic\fP is installed on the
|
||||
system and will be silently ignored otherwise.
|
||||
.TP
|
||||
.B color \fIfgcolor\fP,\fIbgcolor\fP "\fIregex\fP" ...
|
||||
.B color \fIfgcolor\fR,\fIbgcolor\fR """\fIregex\fR""" ...
|
||||
For the currently defined syntax, display all expressions matching
|
||||
the extended regular expression \fIregex\fP with foreground color
|
||||
\fIfgcolor\fP and background color \fIbgcolor\fP, at least one of which
|
||||
must be specified. Legal colors for foreground and background color
|
||||
must be specified. Valid colors for foreground and background
|
||||
are: white, black, red, blue, green, yellow, magenta, and cyan. You may
|
||||
use the prefix "bright" to force a stronger color highlight for the
|
||||
use the prefix "bright" to get a stronger color highlight for the
|
||||
foreground. If your terminal supports transparency, not specifying a
|
||||
\fIbgcolor\fP tells \fBnano\fP to attempt to use a transparent
|
||||
background.
|
||||
.TP
|
||||
.B icolor \fIfgcolor\fP,\fIbgcolor\fP "\fIregex\fP" ...
|
||||
.B icolor \fIfgcolor\fR,\fIbgcolor\fR """\fIregex\fR""" ...
|
||||
Same as above, except that the expression matching is case insensitive.
|
||||
.TP
|
||||
.B color \fIfgcolor\fP,\fIbgcolor\fP start="\fIsr\fP" end="\fIer\fP"
|
||||
.BR color " \fIfgcolor\fR,\fIbgcolor\fR " start= """\fIsr\fR"" " end= """\fIer\fR""
|
||||
Display expressions which start with the extended regular expression
|
||||
\fIsr\fP and end with the extended regular expression \fIer\fP with
|
||||
foreground color \fIfgcolor\fP and background color \fIbgcolor\fP,
|
||||
@@ -272,19 +304,35 @@ highlighting to span multiple lines. Note that all subsequent instances
|
||||
of \fIsr\fP after an initial \fIsr\fP is found will be highlighted until
|
||||
the first instance of \fIer\fP.
|
||||
.TP
|
||||
.B icolor \fIfgcolor\fP,\fIbgcolor\fP start="\fIsr\fP" end="\fIer\fP"
|
||||
.BR icolor " \fIfgcolor\fR,\fIbgcolor\fR " start= """\fIsr\fR"" " end= """\fIer\fR""
|
||||
Same as above, except that the expression matching is case insensitive.
|
||||
.TP
|
||||
.B include "\fIsyntaxfile\fP"
|
||||
.BR include " ""\fIsyntaxfile\fR"""
|
||||
Read in self-contained color syntaxes from \fIsyntaxfile\fP. Note that
|
||||
\fIsyntaxfile\fP can only contain \fBsyntax\fP, \fBcolor\fP, and
|
||||
\fBicolor\fP commands.
|
||||
.SH KEY BINDINGS
|
||||
\fIsyntaxfile\fP can only contain the above commands, from \fBsyntax\fP
|
||||
to \fBicolor\fP.
|
||||
.TP
|
||||
.BI extendsyntax " str directive " \fR[ "arg " \fR...]
|
||||
Extend the syntax previously defined as \fIstr\fP to include
|
||||
new information. This allows you to add a new \fIcolor\fP, \fIicolor\fP,
|
||||
\fImagic\fP, \fIheader\fP, or \fIlinter\fP directive to an already
|
||||
defined syntax -- useful when you want to add to definitions from the
|
||||
system-installed syntax definitions (which are normally not writable).
|
||||
|
||||
.SH REBINDING KEYS
|
||||
Key bindings may be reassigned via the following commands:
|
||||
.TP
|
||||
.B bind \fIkey\fP \fIfunction\fP \fImenu\fP
|
||||
.BI bind " key function menu"
|
||||
Rebinds the key \fIkey\fP to a new function named \fIfunction\fP in the
|
||||
context of menu \fImenu\fP. The format of \fIkey\fP should be one of:
|
||||
context of menu \fImenu\fP (or in all menus where the function exists
|
||||
by using \fBall\fP).
|
||||
.TP
|
||||
.BI unbind " key menu"
|
||||
Unbinds the key \fIkey\fP from the menu named \fImenu\fP (or from all
|
||||
menus where it exists by using \fBall\fP).
|
||||
|
||||
.TP
|
||||
The format of \fIkey\fP should be one of:
|
||||
.TP
|
||||
.B ^
|
||||
followed by an alpha character or the word "Space".
|
||||
@@ -298,218 +346,262 @@ Example: M-C
|
||||
followed by a numeric value from 1 to 16.
|
||||
Example: F10
|
||||
.TP
|
||||
Valid function names to be bound include:
|
||||
.TP 3
|
||||
|
||||
Valid \fIfunction\fP names to be bound include:
|
||||
|
||||
.TP 2
|
||||
.B help
|
||||
Invoke the help menu.
|
||||
Invokes the help viewer.
|
||||
.TP
|
||||
.B cancel
|
||||
Cancel the current command.
|
||||
Cancels the current command.
|
||||
.TP
|
||||
.B exit
|
||||
Exit from the program.
|
||||
Exits from the program (or from the help viewer or the file browser).
|
||||
.TP
|
||||
.B writeout
|
||||
Write the current buffer to disk.
|
||||
.TP
|
||||
.B justify
|
||||
Justify the current text.
|
||||
Writes the current buffer to disk.
|
||||
.TP
|
||||
.B insert
|
||||
Insert a file into the current buffer (or into a new buffer when multibuffer
|
||||
Inserts a file into the current buffer (or into a new buffer when multibuffer
|
||||
is enabled).
|
||||
.TP
|
||||
.B whereis
|
||||
Search for text in the current buffer.
|
||||
Searches for text in the current buffer.
|
||||
.TP
|
||||
.B searchagain
|
||||
Repeat the last search command.
|
||||
.TP
|
||||
.B up
|
||||
Move up in the editor or browser.
|
||||
.TP
|
||||
.B down
|
||||
Move down in the editor or browser.
|
||||
.TP
|
||||
.B left
|
||||
Move left in the editor or browser.
|
||||
.TP
|
||||
.B right
|
||||
Move right in the editor or browser.
|
||||
.TP
|
||||
.B cut
|
||||
Cut the current line of text and store it.
|
||||
.TP
|
||||
.B uncut
|
||||
Copy the currently stored text into the current buffer position.
|
||||
.TP
|
||||
.B curpos
|
||||
Show the current line, column, word positions in the file.
|
||||
.TP
|
||||
.B firstline
|
||||
Move to the first line of the file.
|
||||
.TP
|
||||
.B lastline
|
||||
Move to the last line of the file.
|
||||
.TP
|
||||
.B gotoline
|
||||
Move to a specific line (and column if specified).
|
||||
Repeats the last search command.
|
||||
.TP
|
||||
.B replace
|
||||
Interactively replace text within the current buffer.
|
||||
Interactively replaces text within the current buffer.
|
||||
.TP
|
||||
.B mark
|
||||
Begin selecting text for cutting or pasting at the current position.
|
||||
.B cut
|
||||
Cuts and stores the current line (or the marked region).
|
||||
.TP
|
||||
.B copytext
|
||||
Copy the currently marked text without deleting it.
|
||||
Copies the current line (or the marked region) without deleting it.
|
||||
.TP
|
||||
.B indent
|
||||
Indent the currently marked text (shift to the right).
|
||||
.B uncut
|
||||
Copies the currently stored text into the current buffer at the
|
||||
current cursor position.
|
||||
.TP
|
||||
.B unindent
|
||||
Un-indent the currently marked text (shift to the left).
|
||||
.B mark
|
||||
Sets the mark at the current position, to start selecting text.
|
||||
.TP
|
||||
.B nextword
|
||||
Move the cursor to the beginning of the next word.
|
||||
.B cutrestoffile
|
||||
Cuts all text from the cursor position till the end of the buffer.
|
||||
.TP
|
||||
.B prevword
|
||||
Move the cursor to the beginning of the previous word.
|
||||
.TP
|
||||
.B home
|
||||
Move the cursor to the beginning of the current line.
|
||||
.TP
|
||||
.B end
|
||||
Move the cursor to the end of the current line.
|
||||
.TP
|
||||
.B beginpara
|
||||
Move the cursor to the beginning of the current paragraph.
|
||||
.TP
|
||||
.B endpara
|
||||
Move the cursor to the end of the current paragraph.
|
||||
.TP
|
||||
.B findbracket
|
||||
Move the cursor to the matching bracket (brace, parenthesis, etc.) of the one
|
||||
under the cursor.
|
||||
.TP
|
||||
.B scrollup
|
||||
Scroll up one line of text from the current position.
|
||||
.TP
|
||||
.B scrolldown
|
||||
Scroll down one line of text from the current position.
|
||||
.TP
|
||||
.B prevbuf
|
||||
Switch to editing/viewing the previous buffer when using multibuffer mode.
|
||||
.TP
|
||||
.B nextbuf
|
||||
Switch to editing/viewing the next buffer when using multibuffer mode.
|
||||
.TP
|
||||
.B verbatim
|
||||
Insert the next character verbatim into the file.
|
||||
.TP
|
||||
.B tab
|
||||
Insert a tab at the current cursor location.
|
||||
.TP
|
||||
.B enter
|
||||
Insert a new line below the current one.
|
||||
.TP
|
||||
.B delete
|
||||
Delete the character under the cursor.
|
||||
.TP
|
||||
.B fulljustify
|
||||
Justify the entire current file.
|
||||
.B curpos
|
||||
Shows the current cursor position: the line, column, and character positions.
|
||||
.TP
|
||||
.B wordcount
|
||||
Count the number of words in the current buffer.
|
||||
Counts the number of words, lines and characters in the current buffer.
|
||||
.TP
|
||||
.B refresh
|
||||
Refresh the screen.
|
||||
.B speller
|
||||
Invokes a spell-checking program (or a linting program, if the current
|
||||
syntax highlighting defines one).
|
||||
.TP
|
||||
.B justify
|
||||
Justifies the current paragraph.
|
||||
.TP
|
||||
.B fulljustify
|
||||
Justifies the entire current buffer.
|
||||
.TP
|
||||
.B indent
|
||||
Indents (shifts to the right) the currently marked text.
|
||||
.TP
|
||||
.B unindent
|
||||
Unindents (shifts to the left) the currently marked text.
|
||||
.TP
|
||||
.B left
|
||||
Goes left one position (in the editor or browser).
|
||||
.TP
|
||||
.B right
|
||||
Goes right one position (in the editor or browser).
|
||||
.TP
|
||||
.B up
|
||||
Goes one line up (in the editor or browser).
|
||||
.TP
|
||||
.B down
|
||||
Goes one line down (in the editor or browser).
|
||||
.TP
|
||||
.B scrollup
|
||||
Scrolls up one line of text from the current position.
|
||||
.TP
|
||||
.B scrolldown
|
||||
Scrolls down one line of text from the current position.
|
||||
.TP
|
||||
.B nextword
|
||||
Moves the cursor to the beginning of the next word.
|
||||
.TP
|
||||
.B prevword
|
||||
Moves the cursor to the beginning of the previous word.
|
||||
.TP
|
||||
.B home
|
||||
Moves the cursor to the beginning of the current line.
|
||||
.TP
|
||||
.B end
|
||||
Moves the cursor to the end of the current line.
|
||||
.TP
|
||||
.B beginpara
|
||||
Moves the cursor to the beginning of the current paragraph.
|
||||
.TP
|
||||
.B endpara
|
||||
Moves the cursor to the end of the current paragraph.
|
||||
.TP
|
||||
.B prevpage
|
||||
Goes up one screenful.
|
||||
.TP
|
||||
.B nextpage
|
||||
Goes down one screenful.
|
||||
.TP
|
||||
.B firstline
|
||||
Goes to the first line of the file.
|
||||
.TP
|
||||
.B lastline
|
||||
Goes to the last line of the file.
|
||||
.TP
|
||||
.B gotoline
|
||||
Goes to a specific line (and column if specified).
|
||||
.TP
|
||||
.B findbracket
|
||||
Moves the cursor to the bracket (brace, parenthesis, etc.) that matches
|
||||
(pairs) with the one under the cursor.
|
||||
.TP
|
||||
.B prevbuf
|
||||
Switches to editing/viewing the previous buffer when using multibuffer mode.
|
||||
.TP
|
||||
.B nextbuf
|
||||
Switches to editing/viewing the next buffer when using multibuffer mode.
|
||||
.TP
|
||||
.B verbatim
|
||||
Inserts the next character verbatim into the file.
|
||||
.TP
|
||||
.B tab
|
||||
Inserts a tab at the current cursor location.
|
||||
.TP
|
||||
.B enter
|
||||
Inserts a new line below the current one.
|
||||
.TP
|
||||
.B delete
|
||||
Deletes the character under the cursor.
|
||||
.TP
|
||||
.B backspace
|
||||
Deletes the character before the cursor.
|
||||
.TP
|
||||
.B undo
|
||||
Undo the text action peformed (add text, delete text, etc).
|
||||
Undoes the last performed text action (add text, delete text, etc).
|
||||
.TP
|
||||
.B redo
|
||||
Redo the last undone action (i.e., undo an undo).
|
||||
Redoes the last undone action (i.e., it undoes an undo).
|
||||
.TP
|
||||
.B refresh
|
||||
Refreshes the screen.
|
||||
.TP
|
||||
.B suspend
|
||||
Suspend the editor (if the suspend function is enabled, see the
|
||||
Suspends the editor (if the suspending function is enabled, see the
|
||||
"suspendenable" entry below).
|
||||
.TP
|
||||
.B casesens
|
||||
Toggle case sensitivity in searching (search/replace menus only).
|
||||
Toggles case sensitivity in searching (search/replace menus only).
|
||||
.TP
|
||||
.B regexp
|
||||
Toggle whether searching/replacing is based on literal strings or regular expressions.
|
||||
Toggles whether searching/replacing is based on literal strings or regular expressions.
|
||||
.TP
|
||||
.B backwards
|
||||
Toggles whether searching/replacing goes forward or backward.
|
||||
.TP
|
||||
.B prevhistory
|
||||
Show the previous history entry in the prompt menus (e.g. search).
|
||||
Shows the previous history entry in the prompt menus (e.g. search).
|
||||
.TP
|
||||
.B nexthistory
|
||||
Show the next history entry in the prompt menus (e.g. search).
|
||||
Shows the next history entry in the prompt menus (e.g. search).
|
||||
.TP
|
||||
.B dontreplace
|
||||
Switch back to searching instead of replacing.
|
||||
Switches back to searching instead of replacing.
|
||||
.TP
|
||||
.B gototext
|
||||
Search for files matching a string in the file browser (reading or writing files).
|
||||
Searches for files matching a string in the file browser (reading or writing files).
|
||||
.TP
|
||||
.B dosformat
|
||||
When writing a file, switch to writing a DOS format (CR/LF).
|
||||
When writing a file, switches to writing a DOS format (CR/LF).
|
||||
.TP
|
||||
.B macformat
|
||||
When writing a file, switch to writing a Mac format.
|
||||
When writing a file, switches to writing a Mac format.
|
||||
.TP
|
||||
.B append
|
||||
When writing a file, append to the end instead of overwriting.
|
||||
When writing a file, appends to the end instead of overwriting.
|
||||
.TP
|
||||
.B prepend
|
||||
When writing a file, 'prepend' (write at the beginning) instead of overwriting.
|
||||
When writing a file, 'prepends' (writes at the beginning) instead of overwriting.
|
||||
.TP
|
||||
.B backup
|
||||
When writing a file, create a backup of the current file.
|
||||
When writing a file, creates a backup of the current file.
|
||||
.TP
|
||||
.B firstfile
|
||||
Move to the first file when using the file browser (reading or writing files).
|
||||
Goes to the first file when using the file browser (reading or writing files).
|
||||
.TP
|
||||
.B lastfile
|
||||
Move to the last file when using the file browser (reading or writing files).
|
||||
Goes to the last file when using the file browser (reading or writing files).
|
||||
.TP
|
||||
.B nohelp
|
||||
Toggle showing/hiding the two-line list of key bindings at the bottom of the screen.
|
||||
Toggles the presence of the two-line list of key bindings at the bottom of the screen.
|
||||
.TP
|
||||
.B constupdate
|
||||
Constantly display the current line, column, word positions.
|
||||
Toggles the constant display of the current line, column, and character positions.
|
||||
.TP
|
||||
.B morespace
|
||||
Toggle showing/hiding the blank line which 'separates' the 'title' from the file text.
|
||||
Toggles the presence of the blank line which 'separates' the titlebar from the file text.
|
||||
.TP
|
||||
.B smoothscroll
|
||||
Toggle smooth scrolling when moving via the arrow keys.
|
||||
Toggles smooth scrolling (when moving around with the arrow keys).
|
||||
.TP
|
||||
.B softwrap
|
||||
Toggles the displaying of overlong lines on multiple screen lines.
|
||||
.TP
|
||||
.B whitespacedisplay
|
||||
Toggle whether whitespace is shown.
|
||||
Toggles the showing of whitespace.
|
||||
.TP
|
||||
.B nosyntax
|
||||
Toggles syntax highlighting.
|
||||
.TP
|
||||
.B smarthome
|
||||
Toggle whether the smart home key function is enabled.
|
||||
Toggles the smartness of the Home key.
|
||||
.TP
|
||||
.B autoindent
|
||||
Toggle whether new lines will contain the same amount of whitespace as the line above.
|
||||
Toggles whether new lines will contain the same amount of whitespace as the preceding line.
|
||||
.TP
|
||||
.B cuttoend
|
||||
Toggle whether cutting text will cut the whole line or just from the current cursor
|
||||
Toggles whether cutting text will cut the whole line or just from the current cursor
|
||||
position to the end of the line.
|
||||
.TP
|
||||
.B nowrap
|
||||
Toggle whether long lines will be wrapped to the next line.
|
||||
Toggles whether long lines will be hard-wrapped to the next line.
|
||||
.TP
|
||||
.B tabstospaces
|
||||
Toggles whether typed tabs will be converted to spaces.
|
||||
.TP
|
||||
.B backupfile
|
||||
Toggles whether a backup will be made of the file to be edited.
|
||||
.TP
|
||||
.B multibuffer
|
||||
Toggles the use of multiple file buffers (if available).
|
||||
.TP
|
||||
.B mouse
|
||||
Toggles mouse support.
|
||||
.TP
|
||||
.B noconvert
|
||||
Toggles automatic conversion of files from DOS/Mac format.
|
||||
.TP
|
||||
.B suspendenable
|
||||
Toggle whether the suspend sequence (normally ^Z) will suspend the editor window.
|
||||
Toggles whether the suspend sequence (normally ^Z) will suspend the editor window.
|
||||
.TP
|
||||
|
||||
Valid menu sections are:
|
||||
.TP
|
||||
Valid \fImenu\fP sections are:
|
||||
|
||||
.TP 2
|
||||
.B main
|
||||
The main editor window where text is entered.
|
||||
The main editor window where text is entered and edited.
|
||||
.TP
|
||||
.B search
|
||||
The search menu (AKA whereis).
|
||||
@@ -530,14 +622,17 @@ The 'write file' menu.
|
||||
The 'insert file' menu.
|
||||
.TP
|
||||
.B extcmd
|
||||
The menu for inserting output from an external comman, reached from the insert menu.
|
||||
The menu for inserting output from an external command, reached from the insert menu.
|
||||
.TP
|
||||
.B help
|
||||
The help menu.
|
||||
The help-viewer menu.
|
||||
.TP
|
||||
.B spell
|
||||
The interactive spell checker Yes/no menu.
|
||||
.TP
|
||||
.B linter
|
||||
The linter menu.
|
||||
.TP
|
||||
.B browser
|
||||
The file browser for inserting or writing a file.
|
||||
.TP
|
||||
@@ -545,26 +640,19 @@ The file browser for inserting or writing a file.
|
||||
The 'search for a file' menu in the file browser.
|
||||
.TP
|
||||
.B gotodir
|
||||
The 'go to directory' menu.
|
||||
The 'go to directory' menu in the file browser.
|
||||
.TP
|
||||
.B all
|
||||
A special name meaning: apply to all menus where this function exists.
|
||||
|
||||
.TP
|
||||
.B unbind \fIkey\fP \fImenu\fP
|
||||
Unbind the key \fIkey\fP from the menu named \fImenu\fP or from all
|
||||
menus by using \fIall\fP. Same key syntax as for binding.
|
||||
Rebinds the key \fIkey\fP to a new function named \fIfunction\fP in the
|
||||
context of menu \fImenu\fP. The format of \fIkey\fP should be one of:
|
||||
.SH FILES
|
||||
.TP
|
||||
.I SYSCONFDIR/nanorc
|
||||
.B SYSCONFDIR/nanorc
|
||||
System-wide configuration file
|
||||
.TP
|
||||
.I ~/.nanorc
|
||||
.B ~/.nanorc
|
||||
Per-user configuration file
|
||||
.SH SEE ALSO
|
||||
.PD 0
|
||||
.TP
|
||||
\fBnano\fP(1)
|
||||
.PP
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
.\" <http://www.gnu.org/licenses/>.
|
||||
.\"
|
||||
.\" $Id$
|
||||
.TH RNANO 1 "version 2.0.0" "August 23, 2007"
|
||||
.TH RNANO 1 "version 2.3.3" "April 2014"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
.SH NAME
|
||||
@@ -29,18 +29,13 @@ Pico clone
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B rnano
|
||||
.I [OPTIONS]\ [[\+LINE,COLUMN]\ FILE]...
|
||||
.RI [ options "] [[\+" line , column "]\ " file "]..."
|
||||
.br
|
||||
|
||||
.SH DESCRIPTION
|
||||
This manual page briefly documents the \fBrnano\fP command.
|
||||
.PP
|
||||
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
|
||||
.\" \fI<whatever>\fP escape sequences to invoke bold face and italics,
|
||||
.\" respectively.
|
||||
\fBnano\fP is a small, free and friendly editor which aims to replace
|
||||
Pico, the default editor included in the non-free Pine package. Rather
|
||||
than just copying Pico's look and feel, \fBnano\fP also implements some
|
||||
Pico, the default editor included in the non-free Pine package. On
|
||||
top of copying Pico's look and feel, \fBnano\fP also implements some
|
||||
missing (or disabled by default) features in Pico, such as "search and
|
||||
replace" and "go to line and column number".
|
||||
.PP
|
||||
@@ -63,14 +58,6 @@ use backup files or spell checking.
|
||||
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \+\fILINE\fP,\fICOLUMN\fP
|
||||
Places cursor at line number \fILINE\fP and column number \fICOLUMN\fP
|
||||
(at least one of which must be specified) on startup, instead of the
|
||||
default of line 1, column 1.
|
||||
.TP
|
||||
.B \-?
|
||||
Same as \fB-h (\-\-help)\fP.
|
||||
.TP
|
||||
.B \-h (\-\-help)
|
||||
Show a summary of command line options and exit.
|
||||
.TP
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
## DOS or Mac format, and that characters specially interpreted by the
|
||||
## shell should not be escaped here.
|
||||
##
|
||||
## To make sure a value is disabled, use "unset <option>".
|
||||
## To make sure an option is disabled, use "unset <option>".
|
||||
##
|
||||
## For the options that take parameters, the default value is given.
|
||||
## Other options are unset by default.
|
||||
@@ -15,10 +15,15 @@
|
||||
## its end. For example, for the "brackets" option, ""')>]}" will match
|
||||
## ", ', ), >, ], and }.
|
||||
|
||||
## Silently ignore problems with unknown directives in the nanorc file.
|
||||
## Useful when your nanorc file might be read on systems with multiple
|
||||
## versions of nano installed (e.g. your home directory is on NFS).
|
||||
# set quiet
|
||||
|
||||
## Use auto-indentation.
|
||||
# set autoindent
|
||||
|
||||
## Backup files to filename~.
|
||||
## Back up files to the current filename plus a tilde.
|
||||
# set backup
|
||||
|
||||
## The directory to put unique backup files in.
|
||||
@@ -34,32 +39,34 @@
|
||||
## paragraphs. They cannot contain blank characters. Only closing
|
||||
## punctuation, optionally followed by closing brackets, can end
|
||||
## sentences.
|
||||
##
|
||||
# set brackets ""')>]}"
|
||||
|
||||
## Do case sensitive searches by default.
|
||||
## Do case-sensitive searches by default.
|
||||
# set casesensitive
|
||||
|
||||
## Constantly display the cursor position in the statusbar. Note that
|
||||
## this overrides "quickblank".
|
||||
# set const
|
||||
|
||||
## Use cut to end of line by default.
|
||||
## Use cut-to-end-of-line by default.
|
||||
# set cut
|
||||
|
||||
## Set the line length for wrapping text and justifying paragraphs.
|
||||
## If fill is 0 or less, the line length will be the screen width less
|
||||
## this number.
|
||||
##
|
||||
## If the value is 0 or less, the wrapping point will be the screen
|
||||
## width less this number.
|
||||
# set fill -8
|
||||
|
||||
## Enable ~/.nano_history for saving and reading search/replace strings.
|
||||
# set historylog
|
||||
|
||||
## Enable vim-style lock-files. This is just to let a vim user know you
|
||||
## are editing a file [s]he is trying to edit and vice versa. There are
|
||||
## no plans to implement vim-style undo state in these files
|
||||
# set locking
|
||||
|
||||
## The opening and closing brackets that can be found by bracket
|
||||
## searches. They cannot contain blank characters. The former set must
|
||||
## come before the latter set, and both must be in the same order.
|
||||
##
|
||||
# set matchbrackets "(<[{)>]}"
|
||||
|
||||
## Use the blank line below the titlebar as extra editing space.
|
||||
@@ -69,13 +76,10 @@
|
||||
## mouse clicks can be used to place the cursor, set the mark (with a
|
||||
## double click), and execute shortcuts. The mouse will work in the X
|
||||
## Window System, and on the console when gpm is running.
|
||||
##
|
||||
# set mouse
|
||||
|
||||
## Allow multiple file buffers (inserting a file will put it into a
|
||||
## separate buffer). You must have configured with --enable-multibuffer
|
||||
## for this to work.
|
||||
##
|
||||
## Switch on multiple file buffers (inserting a file will put it into
|
||||
## a separate buffer).
|
||||
# set multibuffer
|
||||
|
||||
## Don't convert files from DOS/Mac format.
|
||||
@@ -96,10 +100,12 @@
|
||||
## Set operating directory. nano will not read or write files outside
|
||||
## this directory and its subdirectories. Also, the current directory
|
||||
## is changed to here, so any files are inserted from this dir. A blank
|
||||
## string means the operating directory feature is turned off.
|
||||
##
|
||||
## string means the operating-directory feature is turned off.
|
||||
# set operatingdir ""
|
||||
|
||||
## Remember the cursor position in each file for the next editing session.
|
||||
# set poslog
|
||||
|
||||
## Preserve the XON and XOFF keys (^Q and ^S).
|
||||
# set preserve
|
||||
|
||||
@@ -107,19 +113,18 @@
|
||||
## paragraphs. They cannot contain blank characters. Only closing
|
||||
## punctuation, optionally followed by closing brackets, can end
|
||||
## sentences.
|
||||
##
|
||||
# set punct "!.?"
|
||||
|
||||
## Do quick statusbar blanking. Statusbar messages will disappear after
|
||||
## 1 keystroke instead of 26. Note that "const" overrides this.
|
||||
##
|
||||
# set quickblank
|
||||
|
||||
## The email-quote string, used to justify email-quoted paragraphs.
|
||||
## This is an extended regular expression if your system supports them,
|
||||
## otherwise a literal string. Default:
|
||||
## otherwise a literal string.
|
||||
## If you have extended regular expression support, the default is:
|
||||
# set quotestr "^([ ]*[#:>\|}])+"
|
||||
## if you have extended regular expression support, otherwise:
|
||||
## Otherwise:
|
||||
# set quotestr "> "
|
||||
|
||||
## Fix Backspace/Delete confusion problem.
|
||||
@@ -141,12 +146,11 @@
|
||||
## Use smooth scrolling as the default.
|
||||
# set smooth
|
||||
|
||||
## Enable soft line wrapping (AKA full line display).
|
||||
## Enable soft line wrapping (AKA full-line display).
|
||||
# set softwrap
|
||||
|
||||
## Use this spelling checker instead of the internal one. This option
|
||||
## does not properly have a default value.
|
||||
##
|
||||
# set speller "aspell -x -c"
|
||||
|
||||
## Allow nano to be suspended.
|
||||
@@ -171,14 +175,25 @@
|
||||
## The two single-column characters used to display the first characters
|
||||
## of tabs and spaces. 187 in ISO 8859-1 (0000BB in Unicode) and 183 in
|
||||
## ISO-8859-1 (0000B7 in Unicode) seem to be good values for these.
|
||||
# set whitespace " "
|
||||
## The default when in a UTF-8 locale:
|
||||
# set whitespace "»·"
|
||||
## The default otherwise:
|
||||
# set whitespace ">."
|
||||
|
||||
## Detect word boundaries more accurately by treating punctuation
|
||||
## characters as parts of words.
|
||||
# set wordbounds
|
||||
|
||||
|
||||
## Color setup
|
||||
## Paint the interface elements of nano.
|
||||
## This is an example, by default there are no colors.
|
||||
# set titlecolor brightwhite,blue
|
||||
# set statuscolor brightwhite,green
|
||||
# set keycolor green
|
||||
# set functioncolor yellow
|
||||
|
||||
|
||||
## Setup of syntax coloring.
|
||||
##
|
||||
## Format:
|
||||
##
|
||||
@@ -193,8 +208,8 @@
|
||||
## or
|
||||
## icolor foreground,background "regex" ["regex"...]
|
||||
##
|
||||
## "color" will do case sensitive matches, while "icolor" will do case
|
||||
## insensitive matches.
|
||||
## "color" will do case-sensitive matches, while "icolor" will do
|
||||
## case-insensitive matches.
|
||||
##
|
||||
## Valid colors: white, black, red, blue, green, yellow, magenta, cyan.
|
||||
## For foreground colors, you may use the prefix "bright" to get a
|
||||
@@ -207,9 +222,10 @@
|
||||
## color will use a transparent color. If you don't want this, be sure
|
||||
## to set the background color to black or white.
|
||||
##
|
||||
## If you wish, you may put your syntaxes in separate files. You can
|
||||
## make use of such files (which can only include "syntax", "color", and
|
||||
## "icolor" commands) as follows:
|
||||
## All regexes should be extended regular expressions.
|
||||
##
|
||||
## If you wish, you may put your syntax definitions in separate files.
|
||||
## You can make use of such files as follows:
|
||||
##
|
||||
## include "/path/to/syntax_file.nanorc"
|
||||
##
|
||||
@@ -218,95 +234,18 @@
|
||||
## name inside that file. These names are kept fairly short to make
|
||||
## them easier to remember and faster to type using nano's -Y option.
|
||||
##
|
||||
## All regexes should be extended regular expressions.
|
||||
## To include all existing syntax definitions, you can do:
|
||||
# include "@PKGDATADIR@/*.nanorc"
|
||||
|
||||
## Key bindings
|
||||
## Please see nanorc(5) for more details on this
|
||||
|
||||
## Key bindings.
|
||||
## See nanorc(5) for more details on this.
|
||||
##
|
||||
## Here are some samples to get you going
|
||||
## Here are a few samples to get you going.
|
||||
##
|
||||
# bind M-W nowrap main
|
||||
# bind M-A casesens search
|
||||
# bind ^S research main
|
||||
|
||||
## Set this if your backspace key sends delete most of the time (2.1.3+)
|
||||
# bind kdel backspace all
|
||||
|
||||
|
||||
## Nanorc files
|
||||
# include "@PKGDATADIR@/nanorc.nanorc"
|
||||
|
||||
## C/C++
|
||||
# include "@PKGDATADIR@/c.nanorc"
|
||||
|
||||
## Makefiles
|
||||
# include "@PKGDATADIR@/makefile.nanorc"
|
||||
|
||||
## Cascading Style Sheets
|
||||
# include "@PKGDATADIR@/css.nanorc"
|
||||
|
||||
## Debian files
|
||||
# include "@PKGDATADIR@/debian.nanorc"
|
||||
|
||||
## Gentoo files
|
||||
# include "@PKGDATADIR@/gentoo.nanorc"
|
||||
|
||||
## HTML
|
||||
# include "@PKGDATADIR@/html.nanorc"
|
||||
|
||||
## PHP
|
||||
# include "@PKGDATADIR@/php.nanorc"
|
||||
|
||||
## TCL
|
||||
# include "@PKGDATADIR@/tcl.nanorc"
|
||||
|
||||
## TeX
|
||||
# include "@PKGDATADIR@/tex.nanorc"
|
||||
|
||||
## Quoted emails (under e.g. mutt)
|
||||
# include "@PKGDATADIR@/mutt.nanorc"
|
||||
|
||||
## Patch files
|
||||
# include "@PKGDATADIR@/patch.nanorc"
|
||||
|
||||
## Manpages
|
||||
# include "@PKGDATADIR@/man.nanorc"
|
||||
|
||||
## Groff
|
||||
# include "@PKGDATADIR@/groff.nanorc"
|
||||
|
||||
## Perl
|
||||
# include "@PKGDATADIR@/perl.nanorc"
|
||||
|
||||
## Python
|
||||
# include "@PKGDATADIR@/python.nanorc"
|
||||
|
||||
## Ruby
|
||||
# include "@PKGDATADIR@/ruby.nanorc"
|
||||
|
||||
## Java
|
||||
# include "@PKGDATADIR@/java.nanorc"
|
||||
|
||||
## Fortran
|
||||
# include "@PKGDATADIR@/fortran.nanorc"
|
||||
|
||||
## Objective-C
|
||||
# include "@PKGDATADIR@/objc.nanorc"
|
||||
|
||||
## OCaml
|
||||
# include "@PKGDATADIR@/ocaml.nanorc"
|
||||
|
||||
## AWK
|
||||
# include "@PKGDATADIR@/awk.nanorc"
|
||||
|
||||
## Assembler
|
||||
# include "@PKGDATADIR@/asm.nanorc"
|
||||
|
||||
## Bourne shell scripts
|
||||
# include "@PKGDATADIR@/sh.nanorc"
|
||||
|
||||
## POV-Ray
|
||||
# include "@PKGDATADIR@/pov.nanorc"
|
||||
|
||||
## XML-type files
|
||||
# include "@PKGDATADIR@/xml.nanorc"
|
||||
## Set this if your backspace key sends Del most of the time.
|
||||
# bind Del backspace all
|
||||
|
||||
@@ -1,30 +1,39 @@
|
||||
pkgdata_DATA = asm.nanorc \
|
||||
c.nanorc \
|
||||
awk.nanorc \
|
||||
changelog.nanorc \
|
||||
cmake.nanorc \
|
||||
c.nanorc \
|
||||
css.nanorc \
|
||||
debian.nanorc \
|
||||
default.nanorc \
|
||||
fortran.nanorc \
|
||||
gentoo.nanorc \
|
||||
go.nanorc \
|
||||
groff.nanorc \
|
||||
html.nanorc \
|
||||
java.nanorc \
|
||||
javascript.nanorc \
|
||||
json.nanorc \
|
||||
lua.nanorc \
|
||||
makefile.nanorc \
|
||||
man.nanorc \
|
||||
mgp.nanorc \
|
||||
mutt.nanorc \
|
||||
nanorc.nanorc \
|
||||
objc.nanorc \
|
||||
ocaml.nanorc \
|
||||
patch.nanorc \
|
||||
perl.nanorc \
|
||||
php.nanorc \
|
||||
po.nanorc \
|
||||
pov.nanorc \
|
||||
python.nanorc \
|
||||
ruby.nanorc \
|
||||
sh.nanorc \
|
||||
tex.nanorc \
|
||||
spec.nanorc \
|
||||
tcl.nanorc \
|
||||
php.nanorc \
|
||||
gentoo.nanorc \
|
||||
debian.nanorc \
|
||||
awk.nanorc \
|
||||
css.nanorc \
|
||||
xml.nanorc \
|
||||
ocaml.nanorc \
|
||||
objc.nanorc \
|
||||
fortran.nanorc \
|
||||
makefile.nanorc \
|
||||
mgp.nanorc
|
||||
tex.nanorc \
|
||||
texinfo.nanorc \
|
||||
xml.nanorc
|
||||
|
||||
EXTRA_DIST = $(pkgdata_DATA)
|
||||
|
||||
@@ -1,18 +1,23 @@
|
||||
## Here is an example for assembler.
|
||||
##
|
||||
|
||||
syntax "asm" "\.(S|s|asm)$"
|
||||
magic "[Aa]ssembl(y|er)"
|
||||
|
||||
color red "\<[A-Z_]{2,}\>"
|
||||
color brightgreen "\.(data|subsection|text)"
|
||||
color green "\.(align|file|globl|global|hidden|section|size|type|weak)"
|
||||
color brightyellow "\.(ascii|asciz|byte|double|float|hword|int|long|short|single|struct|word)"
|
||||
icolor brightred "^[[:space:]]*[.0-9A-Z_]*:"
|
||||
color brightcyan "^[[:space:]]*#[[:space:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)"
|
||||
## Highlight strings (note: VERY resource intensive)
|
||||
|
||||
# Strings.
|
||||
color brightyellow "<[^= ]*>" ""(\\.|[^"])*""
|
||||
# Multiline strings (note: VERY resource intensive).
|
||||
color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
|
||||
## Highlight comments
|
||||
|
||||
# Comments.
|
||||
color brightblue "//.*"
|
||||
color brightblue start="/\*" end="\*/"
|
||||
## Highlight trailing whitespace
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
|
||||
@@ -1,24 +1,25 @@
|
||||
## Here is an example for awk.
|
||||
##
|
||||
|
||||
syntax "awk" "\.awk$"
|
||||
magic "awk.*script text"
|
||||
## records
|
||||
|
||||
# Records.
|
||||
icolor brightred "\$[0-9A-Z_!@#$*?-]+"
|
||||
## awk-set variables
|
||||
# Awk-set variables.
|
||||
color red "\<(ARGC|ARGIND|ARGV|BINMODE|CONVFMT|ENVIRON|ERRNO|FIELDWIDTHS)\>"
|
||||
color red "\<(FILENAME|FNR|FS|IGNORECASE|LINT|NF|NR|OFMT|OFS|ORS)\>"
|
||||
color red "\<(PROCINFO|RS|RT|RSTART|RLENGTH|SUBSEP|TEXTDOMAIN)\>"
|
||||
## function declarations and special patterns
|
||||
# Function declarations and special patterns.
|
||||
color brightgreen "\<(function|extension|BEGIN|END)\>"
|
||||
## operators
|
||||
# Operators.
|
||||
color green "(\{|\}|\(|\)|\;|\]|\[|\\|<|>|!|=|&|\+|-|\*|%|/|\?:|\^|\|)"
|
||||
## flow control
|
||||
# Flow control.
|
||||
color brightyellow "\<(for|if|while|do|else|in|delete|exit)\>"
|
||||
color brightyellow "\<(break|continue|return)\>"
|
||||
## I/O statements
|
||||
# I/O statements.
|
||||
color brightgreen "\<(close|getline|next|nextfile|print|printf)\>"
|
||||
color brightgreen "\<(system|fflush)\>"
|
||||
## standard functions
|
||||
# Standard functions.
|
||||
color magenta "\<(atan2|cos|exp|int|log|rand|sin|sqrt|srand)\>"
|
||||
color magenta "\<(asort|asorti|gensub|gsub|index|length|match)\>"
|
||||
color magenta "\<(split|sprintf|strtonum|sub|substr|tolower|toupper)\>"
|
||||
@@ -26,14 +27,10 @@ color magenta "\<(mktime|strftime|systime)\>"
|
||||
color magenta "\<(and|compl|lshift|or|rshift|xor)\>"
|
||||
color magenta "\<(bindtextdomain|dcgettext|dcngettext)\>"
|
||||
|
||||
##
|
||||
## String highlighting. You will in general want your comments and
|
||||
## strings to come last, because syntax highlighting rules will be
|
||||
## applied in the order they are read in.
|
||||
# Strings.
|
||||
color brightyellow "<[^= ]*>" ""(\\.|[^"])*""
|
||||
|
||||
## Comment highlighting
|
||||
# Comments.
|
||||
color brightblue "(^|[[:space:]])#.*$"
|
||||
|
||||
## Trailing whitespace
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
## Here is an example for C/C++.
|
||||
##
|
||||
syntax "c" "\.(c(c|pp|xx)?|C)$" "\.(h(h|pp|xx)?|H)$" "\.ii?$"
|
||||
magic "ASCII C(\+\+)? program text"
|
||||
color brightred "\<[A-Z_][0-9A-Z_]+\>"
|
||||
color green "\<(float|double|bool|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\>"
|
||||
|
||||
syntax "c" "\.(c(c|pp|xx|\+\+)?|C)$" "\.(h(h|pp|xx)?|H)$" "\.ii?$"
|
||||
magic "(ASCII|UTF-8 Unicode) C(\+\+)? program text"
|
||||
|
||||
color brightred "\<[A-Z_][0-9A-Z_]+\>"
|
||||
color green "\<(float|double|bool|char|int|short|long|sizeof|enum|void|auto|static|const|struct|union|typedef|extern|(un)?signed|inline)\>"
|
||||
color green "\<((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\>"
|
||||
color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>"
|
||||
color brightyellow "\<(for|if|while|do|else|case|default|switch)\>"
|
||||
@@ -11,21 +12,22 @@ color brightyellow "\<(try|throw|catch|operator|new|delete)\>"
|
||||
color magenta "\<(goto|continue|break|return)\>"
|
||||
color brightcyan "^[[:space:]]*#[[:space:]]*(define|include(_next)?|(un|ifn?)def|endif|el(if|se)|if|warning|error|pragma)"
|
||||
color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
|
||||
##
|
||||
## GCC builtins
|
||||
|
||||
# GCC builtins.
|
||||
color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
|
||||
##
|
||||
## String highlighting. You will in general want your comments and
|
||||
## strings to come last, because syntax highlighting rules will be
|
||||
## applied in the order they are read in.
|
||||
|
||||
# Strings. In general you will want your strings and comments to come last,
|
||||
# because highlighting rules are applied in the order they are read in.
|
||||
color brightyellow "<[^= ]*>" ""(\\.|[^"])*""
|
||||
##
|
||||
## This string is VERY resource intensive!
|
||||
# Multiline strings. This regex is VERY resource intensive!
|
||||
color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
|
||||
|
||||
## Comment highlighting
|
||||
# Comments.
|
||||
color brightblue "//.*"
|
||||
color brightblue start="/\*" end="\*/"
|
||||
|
||||
## Trailing whitespace
|
||||
# Reminders.
|
||||
color ,yellow "(FIXME|TODO|XXX)"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
|
||||
25
doc/syntax/changelog.nanorc
Normal file
25
doc/syntax/changelog.nanorc
Normal file
@@ -0,0 +1,25 @@
|
||||
## Colouring for Changelogs.
|
||||
|
||||
syntax "changelog" "Change[Ll]og.*"
|
||||
|
||||
# Author lines.
|
||||
color green "^(19|20).*$"
|
||||
# Dates.
|
||||
color red "^(19|20)[0-9-]{8}"
|
||||
# Email addresses.
|
||||
color yellow "<[^>]*@[^>]*>"
|
||||
|
||||
# Changed files.
|
||||
color magenta "[[:space:]]\*[[:space:]].*:"
|
||||
|
||||
# Command-line options.
|
||||
color cyan "[[:space:]]-[a-zA-Z\$]" "--[8a-z-]+"
|
||||
# Bug numbers.
|
||||
color cyan "bug #[0-9]{5}"
|
||||
# Probable variables, for variety.
|
||||
color brightred "\<[A-Z_][0-9A-Z_]+\>"
|
||||
# Key sequences.
|
||||
color brightblue "\^[A-Z]" "\<M-." "\<F1?[0-9]" "(\^|M-)Space"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
@@ -1,5 +1,5 @@
|
||||
## CMake syntax highlighter for GNU Nano
|
||||
##
|
||||
## Syntax highlighting for CMake files.
|
||||
|
||||
syntax "cmake" "(CMakeLists\.txt|\.cmake)$"
|
||||
|
||||
icolor green "^[[:space:]]*[A-Z0-9_]+"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
## Here is an example for css files.
|
||||
##
|
||||
## Here is an example for CSS files.
|
||||
|
||||
syntax "css" "\.css$"
|
||||
|
||||
color brightred "."
|
||||
color brightyellow start="\{" end="\}"
|
||||
color brightwhite start=":" end="([;^\{]|$)"
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
## Here is an exmaple for apt's sources.list
|
||||
## Adapted from http://milianw.de/blog/Syntax-Highlighting-in-Nano
|
||||
## (mail@milianw.de).
|
||||
##
|
||||
## Here is an example for apt's sources.list.
|
||||
|
||||
syntax "apt/sources.list" "sources\.list(\.old|~)?$"
|
||||
# component
|
||||
color brightmagenta "^deb(-src)? ((http|file|ftp):/[^ ]+|cdrom:\[[^\]]+\]/|cdrom:\[[-a-zA-Z0-9\._\(\) ]+\]/) [^ ]+ .+$"
|
||||
# distribution
|
||||
color brightred "^deb(-src)? ((http|file|ftp):/[^ ]+|cdrom:\[[^\]]+\]/|cdrom:\[[-a-zA-Z0-9\._\(\) ]+\]/) [^ ]+"
|
||||
# URI
|
||||
color brightgreen "(http|file|ftp):/[^ ]+"
|
||||
# cdroms
|
||||
# [^\]] does not work...
|
||||
|
||||
# Coloring the deb lines, working from tail to head. First the
|
||||
# components -- well, everything, and thus also the components.
|
||||
color brightmagenta "^deb.*"
|
||||
# Distribution -- well, everything, except the components.
|
||||
color brightred "^deb(-src)? ((http|ftp|rsh|ssh|file|copy):/[^ ]+|cdrom:\[[-a-zA-Z0-9\._\(\) ]+\]/) [^ ]+"
|
||||
# URIs.
|
||||
color brightgreen "(http|ftp|rsh|ssh|file|copy):/[^ ]+"
|
||||
# CDroms.
|
||||
color brightgreen "cdrom:\[[-a-zA-Z0-9\._\(\) ]+\]/"
|
||||
# deb / deb-src
|
||||
color yellow "^deb"
|
||||
color yellow "^deb-src"
|
||||
# comments
|
||||
# And finally the initial deb tag.
|
||||
color yellow "^deb(-src)?"
|
||||
|
||||
# Comments.
|
||||
color brightblue "#.*"
|
||||
|
||||
|
||||
10
doc/syntax/default.nanorc
Normal file
10
doc/syntax/default.nanorc
Normal file
@@ -0,0 +1,10 @@
|
||||
## A default syntax, which is used
|
||||
## for files that do not match any other syntax.
|
||||
|
||||
syntax "default"
|
||||
|
||||
# Spaces in front of tabs.
|
||||
color ,red " + +"
|
||||
|
||||
# Nano's name, including version.
|
||||
color brightred "(GNU )?nano [1-9]\.[0-9]\.[^[:space:][:punct:]]+"
|
||||
@@ -1,9 +1,8 @@
|
||||
## Here is an example for Fortran 90/95
|
||||
## Here is an example for Fortran 90/95.
|
||||
|
||||
syntax "fortran" "\.(f|f90|f95)$"
|
||||
syntax "fortran" "\.(f|f90|f95)$"
|
||||
|
||||
#color red "\<[A-Z_]a[0-9A-Z_]+\>"
|
||||
color red "\<[0-9]+\>"
|
||||
color red "\<[0-9]+\>"
|
||||
|
||||
icolor green "\<(action|advance|all|allocatable|allocated|any|apostrophe)\>"
|
||||
icolor green "\<(append|asis|assign|assignment|associated|character|common)\>"
|
||||
@@ -15,16 +14,16 @@ icolor green "\<(operator|optional|pack|parameter|pointer|position|private)\>"
|
||||
icolor green "\<(program|public|real|recl|recursive|selected_int_kind)\>"
|
||||
icolor green "\<(selected_real_kind|subroutine|status)\>"
|
||||
|
||||
icolor cyan "\<(abs|achar|adjustl|adjustr|allocate|bit_size|call|char)\>"
|
||||
icolor cyan "\<(close|contains|count|cpu_time|cshift|date_and_time)\>"
|
||||
icolor cyan "\<(deallocate|digits|dot_product|eor|eoshift|function|iachar)\>"
|
||||
icolor cyan "\<(iand|ibclr|ibits|ibset|ichar|ieor|iolength|ior|ishft|ishftc)\>"
|
||||
icolor cyan "\<(lbound|len|len_trim|matmul|maxexponent|maxloc|maxval|merge)\>"
|
||||
icolor cyan "\<(minexponent|minloc|minval|mvbits|namelist|nearest|nullify)\>"
|
||||
icolor cyan "\<(open|pad|present|print|product|pure|quote|radix)\>"
|
||||
icolor cyan "\<(random_number|random_seed|range|read|readwrite|replace)\>"
|
||||
icolor cyan "\<(reshape|rewind|save|scan|sequence|shape|sign|size|spacing)\>"
|
||||
icolor cyan "\<(spread|sum|system_clock|target|transfer|transpose|trim)\>"
|
||||
icolor cyan "\<(abs|achar|adjustl|adjustr|allocate|bit_size|call|char)\>"
|
||||
icolor cyan "\<(close|contains|count|cpu_time|cshift|date_and_time)\>"
|
||||
icolor cyan "\<(deallocate|digits|dot_product|eor|eoshift|function|iachar)\>"
|
||||
icolor cyan "\<(iand|ibclr|ibits|ibset|ichar|ieor|iolength|ior|ishft|ishftc)\>"
|
||||
icolor cyan "\<(lbound|len|len_trim|matmul|maxexponent|maxloc|maxval|merge)\>"
|
||||
icolor cyan "\<(minexponent|minloc|minval|mvbits|namelist|nearest|nullify)\>"
|
||||
icolor cyan "\<(open|pad|present|print|product|pure|quote|radix)\>"
|
||||
icolor cyan "\<(random_number|random_seed|range|read|readwrite|replace)\>"
|
||||
icolor cyan "\<(reshape|rewind|save|scan|sequence|shape|sign|size|spacing)\>"
|
||||
icolor cyan "\<(spread|sum|system_clock|target|transfer|transpose|trim)\>"
|
||||
icolor cyan "\<(ubound|unpack|verify|write|tiny|type|use|yes)\>"
|
||||
|
||||
icolor yellow "\<(.and.|case|do|else|else?if|else?where|end|end?do|end?if)\>"
|
||||
@@ -33,9 +32,8 @@ icolor yellow "\<(.or.|repeat|select case|then|where|while)\>"
|
||||
|
||||
icolor magenta "\<(continue|cycle|exit|go?to|result|return)\>"
|
||||
|
||||
## String highlighting.
|
||||
# Strings.
|
||||
icolor yellow "<[^= ]*>" ""(\\.|[^"])*""
|
||||
|
||||
## Comment highlighting
|
||||
# Comments.
|
||||
icolor blue "!.*"
|
||||
|
||||
|
||||
@@ -1,31 +1,41 @@
|
||||
## Here is an example for Gentoo ebuilds/eclasses
|
||||
##
|
||||
## Here is an example for Gentoo ebuilds/eclasses.
|
||||
|
||||
syntax "ebuild" "\.e(build|class)$"
|
||||
|
||||
## All the standard portage functions
|
||||
color brightgreen "^src_(unpack|prepare|configure|compile|install|test)" "^pkg_(config|nofetch|setup|(pre|post)(inst|rm))"
|
||||
color brightgreen "(^|\<default_)src_(unpack|prepare|configure|compile|install|test)\>"
|
||||
color brightgreen "^pkg_(config|nofetch|info|pretend|setup|(pre|post)(inst|rm))\>"
|
||||
color brightgreen "\<default(_pkg_nofetch|_src_(unpack|prepare|configure|compile|test))?\>"
|
||||
## Highlight bash related syntax
|
||||
color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while|continue|break)\>"
|
||||
color green "\<(declare|eval|exec|let)\>"
|
||||
color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
|
||||
color green "-[edfgruwxL]\>"
|
||||
color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
|
||||
color green "\<(break|case|continue|do|done|elif|else|esac|exit|fi|for|function|if|in|read|return|select|shift|then|time|until|while)\>"
|
||||
color green "\<(declare|eval|exec|export|let|local)\>"
|
||||
color green "[{}():;|`$<>!=&\\]" "(\]|\[)"
|
||||
color green "-[defhnrsuwxzL]\>"
|
||||
color green "-(eq|ne|gt|lt|ge|le)\>"
|
||||
## Highlight variables ... official portage ones in red, all others in bright red
|
||||
color brightred "\$\{?[a-zA-Z_0-9]+\}?"
|
||||
color red "\<(EAPI|ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|(P|R)?DEPEND|PROVIDE|PROPERTIES|RESTRICT|USERLAND)\>"
|
||||
color red "\<(S|D|T|PV|PF|P|PN|PR|PVR|A|CATEGORY|DISTDIR|FILESDIR|ROOT|WORKDIR)\>" "\<(AS|C(PP|XX)?|LD)FLAGS\>" "\<C(HOST|TARGET|BUILD)\>"
|
||||
color red "\<QA_((TEXTRELS|EXECSTACK|WX_LOAD)(_[a-zA-Z_0-9]+)?|DT_HASH|PRESTRIPPED)\>" "\<WANT_AUTO(CONF|MAKE)\>" "\<AT_M4DIR\>"
|
||||
color brightred "\$[-0-9@*#?$!]" "\$[[:alpha:]_][[:alnum:]_]*"
|
||||
color brightred "\$\{[#!]?([-@*#?$!]|[0-9]+|[[:alpha:]_][[:alnum:]_]*)(\[([[:digit:]]|@)+\])?(([#%/]|:?[-=?+])[^}]*\}|\[|\})"
|
||||
color red "\<(EAPI|ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|[HPR]?DEPEND|PROVIDE|PROPERTIES|REQUIRED_USE|RESTRICT|USERLAND)\>"
|
||||
color red "\<(S|E?D|T|PV|PF|P|PN|PR|PVR|A|CATEGORY|DISTDIR|FILESDIR|EPREFIX|E?ROOT|WORKDIR)\>"
|
||||
color red "\<(AS|C(PP|XX)?|LD)FLAGS\>" "\<C(HOST|TARGET|BUILD)\>" "\<(MERGE_TYPE|REPLACING_VERSIONS|REPLACED_BY_VERSION)\>"
|
||||
color red "\<EBUILD_PHASE(_FUNC)?\>"
|
||||
color red "\<QA_((TEXTRELS|EXECSTACK|WX_LOAD)(_[a-zA-Z_0-9]+)?|DT_HASH|PRESTRIPPED)\>"
|
||||
color red "\<(PATCHES|(HTML_)?DOCS)\>" "\<WANT_(AUTO(CONF|MAKE)|LIBTOOL)\>" "\<AT_M4DIR\>"
|
||||
## Highlight portage commands
|
||||
color magenta "\<use(_(with|enable))?\> [!a-zA-Z0-9_+ -]*" "inherit.*"
|
||||
color brightblue "\<e(begin|end|conf|install|make|qmake[34]|ant|(qa)?warn|infon?|error|log|patch|new(group|user))\>"
|
||||
color brightblue "\<e(pause|beep|mktemp|(cvs|svn)_clean|punt_cxx)\>" "\<e(aclocal|auto(reconf|header|conf|make))\>"
|
||||
color brightblue "\<built_with_use\>" "\<make_desktop_entry\>" "\<unpack(_(makeself|pdv))?\>"
|
||||
color brightblue "\<die\>" "\<use(_(with|enable))?\>" "\<inherit\>" "\<has\>" "\<(has|best)_version\>"
|
||||
color magenta "\<(use(_(with|enable|if_iuse)|x)?|in_iuse)\> [!a-zA-Z0-9_+ -]*" "inherit.*"
|
||||
color brightblue "\<e(begin|end|conf|install|make|qmake4|ant|(qa)?warn|infon?|error|log|patch(_user)?|new(group|user))\>"
|
||||
color brightblue "\<e(pause|beep|mktemp|(cvs|svn)_clean|punt_cxx)\>" "\<e(aclocal|auto(reconf|header|conf|make)|libtoolize)\>"
|
||||
color brightblue "\<e(stack|shopts|umask)_(push|pop)\>" "\<version_is_at_least\>"
|
||||
color brightblue "\<make_desktop_entry\>" "\<unpack(_(makeself|pdv))?\>"
|
||||
color brightblue "\<(die|hasv?|inherit|nonfatal)\>" "\<(use(_(with|enable|if_iuse)|x)?|in_iuse)\>" "\<(has|best)_version\>"
|
||||
color brightblue "\<(do|new)(ins|(games)?s?bin|doc|lib(\.so|\.a)?|man|info|exe|initd|confd|envd|pam|menu|icon)\>"
|
||||
color brightblue "\<do(python|sed|dir|hard|sym|html|jar|mo)\>" "\<keepdir\>"
|
||||
color brightblue "prepall(docs|info|man|strip)?" "prep(info|lib|lib\.(so|a)|man|strip|gamesdirs)"
|
||||
color brightblue "\<do(compress|header|python|sed|dir|hard|sym|html|jar|mo)\>" "\<keepdir\>"
|
||||
color brightblue "\<prepall(docs|info|man|strip)?\>" "\<prep(info|lib|lib\.(so|a)|man|strip|gamesdirs)\>"
|
||||
color brightblue "\<(doc|ins|exe)?into\>" "\<(f|games)(owners|perms)\>" "\<(exe|ins|dir)opts\>"
|
||||
color brightblue "\<tc-get(BUILD_)?(AR|AS|CC|CPP|CXX|LD|NM|OBJCOPY|PKG_CONFIG|RANLIB)\>"
|
||||
color brightblue "\<tc-(arch(-kernel)?|export|has-(tls|openmp))\>"
|
||||
## Highlight common commands used in ebuilds
|
||||
color blue "\<make\>" "\<(awk|cat|cd|chmod|chown|cp|echo|env|export|find|e?grep|ln|mkdir|mv|rm|sed|set|tar|touch|unset|xargs)\>"
|
||||
color blue "\<(awk|cat|cd|chmod|chown|cp|echo|env|find|e?grep|ln|make|mkdir|mv|popd|printf|pushd|rm|rmdir|sed|set|tar|touch|unset|xargs)\>"
|
||||
## Highlight comments (doesnt work that well)
|
||||
color yellow "(^|[[:space:]])#.*$"
|
||||
## Highlight strings (doesnt work that well)
|
||||
@@ -33,9 +43,9 @@ color brightyellow ""(\\.|[^\"])*"" "'(\\.|[^'])*'"
|
||||
## Trailing space is bad!
|
||||
color ,green "[[:space:]]+$"
|
||||
|
||||
## Here is an example for Portage control files
|
||||
## Here is an example for Portage control files.
|
||||
##
|
||||
syntax "/etc/portage" "\.(keywords|mask|unmask|use)(/.+)?$"
|
||||
syntax "/etc/portage" "\.(accept_keywords|env|keywords|mask|unmask|use)(/.+)?$"
|
||||
## Base text:
|
||||
color green "^.+$"
|
||||
## Use flags:
|
||||
@@ -53,3 +63,5 @@ color cyan "^[[:space:]]*.*/"
|
||||
color brightmagenta "^[[:space:]]*(=|~|<|<=|=<|>|>=|=>)"
|
||||
## Comments:
|
||||
color yellow "#.*$"
|
||||
## Trailing space is bad!
|
||||
color ,green "[[:space:]]+$"
|
||||
|
||||
42
doc/syntax/go.nanorc
Normal file
42
doc/syntax/go.nanorc
Normal file
@@ -0,0 +1,42 @@
|
||||
## Here is an example for Go.
|
||||
|
||||
syntax "go" "\.go$"
|
||||
|
||||
# Types.
|
||||
color green "\<(bool|u?int(8|16|32|64)?|float(32|64)|complex(64|128)|byte|rune|uintptr|string|error)\>"
|
||||
color green "\<((<-[[:space:]]*)chan|chan[[:space:]]*<-|const|func|interface|map|struct|type|var)\>"
|
||||
|
||||
# Predefined functions.
|
||||
color blue "\<(append|cap|close|complex|copy|delete|imag|len|make|new|panic|print|println|real|recover)\>"
|
||||
|
||||
# Control structures.
|
||||
color brightyellow "\<(case|default|defer|else|for|go|if|range|select|switch)\>"
|
||||
|
||||
# Control flow.
|
||||
color magenta "\<(break|continue|fallthrough|goto|return)\>"
|
||||
|
||||
# Declarations.
|
||||
color brightcyan "\<(package|import)\>"
|
||||
color brightcyan "//[[:space:]]*\+build[[:space:]]+(([a-zA-Z_0-9]+[[:space:]]*)+,[[:space:]]*)*[a-zA-Z_0-9]+"
|
||||
|
||||
# Literals.
|
||||
color red "\<[0-9]+\.[0-9]*([Ee][+-][0-9]+)?i?\>"
|
||||
color red "\<[0-9]+[Ee][+-][0-9]+i?\>"
|
||||
color red "\<\.[0-9]+([Ee][+-][0-9]+)?i?\>"
|
||||
color red "\<[0-9]+i\>"
|
||||
color red "\<[1-9][0-9]*\>"
|
||||
color red "\<0[0-7]*\>"
|
||||
icolor red "\<0x[0-9a-f]+\>"
|
||||
|
||||
# Strings and characters; slightly fuzzy.
|
||||
color red "\<(true|false|nil|iota|_)\>"
|
||||
color red "'(\\.|[^'])+'"
|
||||
color red ""(\\.|[^"])*""
|
||||
color red start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
|
||||
|
||||
# Comments.
|
||||
color brightblue "//.*"
|
||||
color brightblue start="/\*" end="\*/"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
@@ -1,24 +1,25 @@
|
||||
## Here is an example for groff.
|
||||
##
|
||||
|
||||
syntax "groff" "\.m[ems]$" "\.rof" "\.tmac$" "^tmac."
|
||||
## The argument of .ds or .nr
|
||||
|
||||
# The argument of .ds or .nr
|
||||
color cyan "^\.(ds|nr) [^[[:space:]]]*"
|
||||
## Single character escapes
|
||||
# Single-character escapes
|
||||
color brightmagenta "\\."
|
||||
## Highlight the argument of \f or \s in the same color
|
||||
# The argument of \f or \s in the same color
|
||||
color brightmagenta "\\f." "\\f\(.." "\\s(\+|\-)?[0-9]"
|
||||
## Newlines
|
||||
# Newlines
|
||||
color cyan "(\\|\\\\)n(.|\(..)"
|
||||
color cyan start="(\\|\\\\)n\[" end="]"
|
||||
## Requests
|
||||
# Requests
|
||||
color brightgreen "^\.[[:space:]]*[^[[:space:]]]*"
|
||||
## Comments
|
||||
# Comments
|
||||
color yellow "^\.\\".*$"
|
||||
## Strings
|
||||
# Strings
|
||||
color green "(\\|\\\\)\*(.|\(..)"
|
||||
color green start="(\\|\\\\)\*\[" end="]"
|
||||
## Characters
|
||||
# Characters
|
||||
color brightred "\\\(.."
|
||||
color brightred start="\\\[" end="]"
|
||||
## Macro arguments
|
||||
# Macro arguments
|
||||
color brightcyan "\\\\\$[1-9]"
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
## Here is a short example for HTML.
|
||||
##
|
||||
syntax "html" "\.html$"
|
||||
|
||||
syntax "html" "\.html?$"
|
||||
magic "HTML document text"
|
||||
color blue start="<" end=">"
|
||||
color red "&[^;[[:space:]]]*;"
|
||||
|
||||
color cyan start="<" end=">"
|
||||
color red "&[^;[:space:]]*;"
|
||||
color green ""(\\.|[^"])*""
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
## Here is an example for Java.
|
||||
##
|
||||
|
||||
syntax "java" "\.java$"
|
||||
magic "Java "
|
||||
|
||||
color green "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>"
|
||||
color red "\<(break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\>"
|
||||
color cyan "\<(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\>"
|
||||
|
||||
19
doc/syntax/javascript.nanorc
Normal file
19
doc/syntax/javascript.nanorc
Normal file
@@ -0,0 +1,19 @@
|
||||
## Here is an example for Javascript.
|
||||
|
||||
syntax "javascript" "\.js$"
|
||||
|
||||
color brightred "\<[A-Z_][0-9A-Z_]+\>"
|
||||
color green "\<(const|function|let|this|typeof|var|void)\>"
|
||||
color brightyellow "\<(for|if|while|with|do|else|case|default|switch)\>"
|
||||
color brightyellow "\<(export|try|throw|catch|new|delete)\>"
|
||||
color magenta "\<(continue|break|return|yield)\>"
|
||||
color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
|
||||
|
||||
# Strings.
|
||||
color brightyellow "<[^= ]*>" ""(\\.|[^"])*"" "'(\\.|[^'])*'"
|
||||
# Comments.
|
||||
color brightblue "//.*"
|
||||
color brightblue start="/\*" end="\*/"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
32
doc/syntax/json.nanorc
Normal file
32
doc/syntax/json.nanorc
Normal file
@@ -0,0 +1,32 @@
|
||||
## Syntax highlighting for JSON files.
|
||||
|
||||
# See: http://www.json.org/
|
||||
# Original author: Aapo Rantalainen
|
||||
# License: GPLv3 or newer
|
||||
|
||||
syntax "json" "\.json$"
|
||||
|
||||
# Numbers (used as value).
|
||||
color green ":[[:space:]]*\-?(0|[1-9][0-9]*)(\.[0-9]+)?([Ee]?[-+]?[0-9]+)?"
|
||||
# Values (well, any string).
|
||||
color brightmagenta "\".+\""
|
||||
# Hex numbers (used as value).
|
||||
color green ":[[:space:]]*\"#[0-9abcdefABCDEF]+\""
|
||||
# Escapes.
|
||||
color green "\\\\" "\\\"" "\\[bfnrt]" "\\u[0-9abcdefABCDEF]{4})"
|
||||
# Special words.
|
||||
color green "(true|false|null)"
|
||||
|
||||
# Names (very unlikely to contain a quote).
|
||||
color brightblue "\"[^"]+\"[[:space:]]*:"
|
||||
|
||||
# Brackets, braces, and separators.
|
||||
color brightblue "\[" "\]"
|
||||
color brightred "\{" "\}"
|
||||
color brightred "," ":"
|
||||
|
||||
# Comments.
|
||||
color cyan "(^|[[:space:]]+)(//|#).*$"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
60
doc/syntax/lua.nanorc
Normal file
60
doc/syntax/lua.nanorc
Normal file
@@ -0,0 +1,60 @@
|
||||
## Syntax highlighting for Lua.
|
||||
#
|
||||
## Author: Matthew Wild <mwild1 (at) gmail.com>
|
||||
## License: GPL 3 or later
|
||||
## Version: 2011-05-05
|
||||
|
||||
syntax "lua" "\.lua$"
|
||||
|
||||
color brightwhite "\[\[.*\]\]"
|
||||
|
||||
# Operators
|
||||
color brightyellow ":|\*|/|%|\+|-|\^|>|>=|<|<=|~=|=|\.\.|\<(not|and|or)\>"
|
||||
|
||||
# Statements
|
||||
color brightblue "\<(do|end|while|repeat|until|if|elseif|then|else|for|in|function|local|return|break)\>"
|
||||
|
||||
# Keywords
|
||||
color brightyellow "\<(debug|string|math|table|io|coroutine|os)\>\."
|
||||
color brightyellow "\<(_G|_VERSION|assert|collectgarbage|dofile|error|getfenv|getmetatable|ipairs|load|loadfile|module|next|pairs|pcall|print|rawequal|rawget|rawset|require|select|setfenv|setmetatable|tonumber|tostring|type|unpack|xpcall)\s*\("
|
||||
|
||||
# Standard library
|
||||
color brightyellow "io\.\<(close|flush|input|lines|open|output|popen|read|tmpfile|type|write|stdin|stdout|stderr)\>"
|
||||
color brightyellow "math\.\<(abs|acos|asin|atan2|atan|ceil|cosh|cos|deg|exp|floor|fmod|frexp|huge|ldexp|log10|log|max|min|mod|modf|pi|pow|rad|random|randomseed|sinh|tan)\>"
|
||||
color brightyellow "os\.\<(clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)\>"
|
||||
color brightyellow "package\.\<(cpath|loaded|loadlib|path|preload|seeall)\>"
|
||||
color brightyellow "string\.\<(byte|char|dump|find|format|gmatch|gsub|len|lower|match|rep|reverse|sub|upper)\>"
|
||||
color brightyellow "table\.\<(concat|insert|maxn|remove|sort)\>"
|
||||
color brightyellow "coroutine\.\<(create|resume|running|status|wrap|yield)\>"
|
||||
color brightyellow "debug\.\<(debug|getfenv|gethook|getinfo|getlocal|getmetatable|getregistry|getupvalue|setfenv|sethook|setlocal|setmetatable|setupvalue|traceback)\>"
|
||||
|
||||
# File handle methods
|
||||
color brightyellow "\:\<(close|flush|lines|read|seek|setvbuf|write)\>"
|
||||
|
||||
# false, nil, true
|
||||
color brightmagenta "\<(false|nil|true)\>"
|
||||
|
||||
# External files
|
||||
color brightgreen "\<(dofile|require)\>"
|
||||
|
||||
# Numbers
|
||||
color red "\<([0-9]+)\>"
|
||||
|
||||
# Symbols
|
||||
color brightmagenta "(\(|\)|\[|\]|\{|\})"
|
||||
|
||||
# Shebang
|
||||
color brightcyan "^#!.*"
|
||||
|
||||
# Simple comments
|
||||
color green "\-\-.*$"
|
||||
|
||||
# Multiline comments
|
||||
color green start="\-\-\[\[" end="\]\]"
|
||||
|
||||
# Strings
|
||||
color red "\"(\\.|[^\\\"])*\"|'(\\.|[^\\'])*'"
|
||||
##color red start="\[\[" end="\]\]"
|
||||
|
||||
# Hex literals
|
||||
color red "0x[0-9a-fA-F]*"
|
||||
@@ -1,8 +1,12 @@
|
||||
# unattributed syntax highlighting example from wiki.linuxhelp.net/
|
||||
## Here is an example for Makefiles.
|
||||
|
||||
syntax "makefile" "Makefile[^/]*$"
|
||||
|
||||
color red "[:=]"
|
||||
color magenta "\<(if|ifeq|else|endif)\>"
|
||||
color blue "\$+[{(][a-zA-Z0-9_-]+[})]"
|
||||
color brightblue "^[^ ]+:"
|
||||
color green "#.*$"
|
||||
|
||||
## Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
## Here is an example for manpages.
|
||||
##
|
||||
|
||||
syntax "man" "\.[1-9]x?$"
|
||||
magic "troff or preprocessor input text"
|
||||
color green "\.(S|T)H.*$"
|
||||
color brightgreen "\.(S|T)H" "\.TP"
|
||||
color brightred "\.(BR?|I[PR]?).*$"
|
||||
color brightblue "\.(BR?|I[PR]?|PP)"
|
||||
color brightwhite "\\f[BIPR]"
|
||||
color yellow "\.(br|DS|RS|RE|PD)"
|
||||
|
||||
color green "\.(SH|SS|TH) .*$"
|
||||
color brightgreen "\.(SH|SS|TH) " "\.([HIT]P)"
|
||||
color brightred "\.(B[IR]?|I[BR]?|R[BI]|S[BM]) .*$"
|
||||
color brightblue "\.(B[IR]?|I[BR]?|R[BI]|S[BM]) " "\.([LP]?P)$"
|
||||
color magenta "\\f[BIPR]"
|
||||
color yellow "\.(br|DT|RS|RE|PD)"
|
||||
|
||||
# Comments.
|
||||
color cyan "\.?\\\".*$"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
## Here is an example for Magicpoint presentations
|
||||
##
|
||||
## Here is an example for Magicpoint presentations.
|
||||
|
||||
syntax "mgp" "\.mgp$"
|
||||
header "^%include.*"
|
||||
|
||||
icolor green "^%[a-z].*$"
|
||||
color cyan "(^|[[:space:]])#.*$"
|
||||
color cyan "(^|[[:space:]])%%.*$"
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
## Here is an example for quoted emails (under e.g. mutt).
|
||||
##
|
||||
|
||||
syntax "mutt"
|
||||
|
||||
# Quoted lines.
|
||||
color green "^>.*"
|
||||
|
||||
# Signatures, even quoted ones.
|
||||
color yellow start="^>* ?-- $" end="^>* ?$"
|
||||
|
||||
@@ -1,16 +1,28 @@
|
||||
## Here is an example for nanorc files.
|
||||
##
|
||||
|
||||
syntax "nanorc" "\.?nanorc$"
|
||||
## Possible errors and parameters
|
||||
icolor brightwhite "^[[:space:]]*((un)?set|include|syntax|i?color).*$"
|
||||
## Keywords
|
||||
icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(allow_insecure_backup|autoindent|backup|backupdir|backwards|boldtext|brackets|casesensitive|const|cut|fill|historylog|matchbrackets|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nonewlines|nowrap|operatingdir|poslog|preserve|punct)\>" "^[[:space:]]*(set|unset)[[:space:]]+(quickblank|quotestr|rebinddelete|rebindkeypad|regexp|smarthome|smooth|softwrap|speller|suspend|suspendenable|tabsize|tabstospaces|tempfile|undo|view|whitespace|wordbounds)\>"
|
||||
icolor green "^[[:space:]]*(set|unset|include|syntax|header|magic)\>"
|
||||
## Colors
|
||||
|
||||
# Possible errors and parameters
|
||||
icolor brightred "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|linter|i?color|extendsyntax).*$"
|
||||
|
||||
# Keywords
|
||||
icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(allow_insecure_backup|autoindent|backup|backwards|boldtext|casesensitive|const|cut|fill|historylog|locking|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nonewlines|nowrap|poslog|preserve|quickblank|quiet|rebinddelete|rebindkeypad|regexp|smarthome|smooth|softwrap|suspend|tabsize|tabstospaces|tempfile|undo|view|wordbounds)\>"
|
||||
icolor yellow "^[[:space:]]*set[[:space:]]+(functioncolor|keycolor||statuscolor|titlecolor)[[:space:]]+(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>"
|
||||
icolor brightgreen "^[[:space:]]*set[[:space:]]+(backupdir|brackets|functioncolor|keycolor|matchbrackets|operatingdir|punct|quotestr|speller|statuscolor|titlecolor|whitespace)[[:space:]]+"
|
||||
icolor brightgreen "^[[:space:]]*bind[[:space:]]+((\^|M-)([[:alpha:]]|space|[]]|[0-9_=+{}|;:'\",./<>\?-])|F([1-9]|1[0-6]))[[:space:]]+[[:alpha:]]+[[:space:]]+[[:alpha:]]+[[:space:]]*$"
|
||||
icolor brightgreen "^[[:space:]]*unbind[[:space:]]+((\^|M-)([[:alpha:]]|space|[]]|[0-9_=+{}|;:'\",./<>\?-])|F([1-9]|1[0-6]))[[:space:]]+[[:alpha:]]+[[:space:]]*$"
|
||||
icolor brightgreen "^[[:space:]]*extendsyntax[[:space:]]+[[:alpha:]]+[[:space:]]+(i?color|header|magic|linter)[[:space:]]+.*$"
|
||||
icolor green "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|linter|extendsyntax)\>"
|
||||
|
||||
# Colors
|
||||
icolor yellow "^[[:space:]]*i?color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>"
|
||||
icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)="
|
||||
## Strings
|
||||
icolor white ""(\\.|[^"])*""
|
||||
## Comments
|
||||
|
||||
# Strings
|
||||
icolor brightmagenta ""(\\.|[^"])*""
|
||||
# Comments
|
||||
icolor brightblue "^[[:space:]]*#.*$"
|
||||
icolor cyan "^[[:space:]]*##.*$"
|
||||
|
||||
# Trailing whitespace
|
||||
color ,green "[[:space:]]+$"
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
## Here is an example for C/C++/Obj-C.
|
||||
##
|
||||
|
||||
syntax "m" "\.m$"
|
||||
|
||||
|
||||
## Stuffs
|
||||
color brightwhite "\<[A-Z_][0-9A-Z_]+\>"
|
||||
# Stuffs,
|
||||
color brightwhite "\<[A-Z_][0-9A-Z_]+\>"
|
||||
color green "\<(float|double|BOOL|bool|char|int|short|long|id|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\>"
|
||||
color green "\<[[:alpha:]_][[:alnum:]_]*_t\>"
|
||||
color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>"
|
||||
@@ -12,30 +11,29 @@ color brightgreen "\<(for|if|while|do|else|case|default|switch)\>"
|
||||
color brightgreen "\<(try|throw|catch|operator|new|delete)\>"
|
||||
color brightgreen "\<(goto|continue|break|return)\>"
|
||||
color brightgreen "@\<(en(code|d)|i(mplementation|nterface)|selector)\>"
|
||||
##
|
||||
## GCC builtins
|
||||
|
||||
# GCC builtins.
|
||||
color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
|
||||
|
||||
## Selector/method
|
||||
# Selector/method.
|
||||
color brightmagenta "(^|[[:space:]])\[.*[[:space:]].*\]"
|
||||
color white ":[[:alnum:]]*"
|
||||
color magenta "[[:alnum:]]*:"
|
||||
color white "\[[^][:space:]]*\]"
|
||||
|
||||
##
|
||||
## String highlighting. You will in general want your comments and
|
||||
## strings to come last, because syntax highlighting rules will be
|
||||
## applied in the order they are read in.
|
||||
# Strings.
|
||||
color brightblack "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
|
||||
color brightblack "<[^= ]*>" ""(\\.|[^"])*""
|
||||
color brightblue "@"(\\.|[^"])*""
|
||||
##
|
||||
## This string is VERY resource intensive!
|
||||
# Multiline strings. This regex is VERY resource intensive!
|
||||
## color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
|
||||
|
||||
# Preprocessor commands.
|
||||
color brightblue "^[[:space:]]*#[[:space:]]*(define|include|import|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
|
||||
|
||||
## Comment highlighting
|
||||
# Comments.
|
||||
color yellow "//.*"
|
||||
color yellow start="/\*" end="\*/"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# OCaml sample nanorc
|
||||
#
|
||||
## Syntax highlighting for OCaml.
|
||||
|
||||
syntax "ocaml" "\.mli?$"
|
||||
|
||||
#uid
|
||||
color red "\<[A-Z][0-9a-z_]{2,}\>"
|
||||
#declarations
|
||||
@@ -10,7 +11,7 @@ color red "\<(type|open|class|module|exception|external)\>"
|
||||
#patterns
|
||||
color blue "\<(fun|function|functor|match|try|with)\>"
|
||||
#patterns-modifiers
|
||||
color yellow "\<(as|when|of)\>"
|
||||
color yellow "\<(as|when|of)\>"
|
||||
#conditions
|
||||
color cyan "\<(if|then|else)\>"
|
||||
#blocs
|
||||
|
||||
@@ -1,11 +1,21 @@
|
||||
## Here is an example for patch files.
|
||||
##
|
||||
|
||||
syntax "patch" "\.(patch|diff)$"
|
||||
magic "diff output text"
|
||||
|
||||
# Added lines.
|
||||
color brightgreen "^\+.*"
|
||||
color green "^\+\+\+.*"
|
||||
# Show trailing whitespace only on added lines.
|
||||
color ,green "[[:space:]]+$"
|
||||
# Context lines.
|
||||
color brightblue "^ .*"
|
||||
# Deleted lines.
|
||||
color brightred "^-.*"
|
||||
|
||||
# File names and dates.
|
||||
color red "^---.*"
|
||||
color green "^\+\+\+.*"
|
||||
# Line numbers.
|
||||
color brightyellow "^@@.*"
|
||||
# Header lines.
|
||||
color magenta "^diff.*"
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
## Here is an example for Perl.
|
||||
##
|
||||
|
||||
syntax "perl" "\.p[lm]$"
|
||||
magic "perl.*script text"
|
||||
header "^#!.*/perl[-0-9._]*"
|
||||
magic "Perl script text"
|
||||
|
||||
color red "\<(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork))\>" "\<(get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join)\>" "\<(keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek(dir)?)\>" "\<(se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr(y)?|truncate|umask)\>" "\<(un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\>"
|
||||
color magenta "\<(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\>"
|
||||
icolor cyan start="[$@%]" end="( |[^0-9A-Z_]|-)"
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
## Here is an example for PHP
|
||||
##
|
||||
## Here is an example for PHP.
|
||||
|
||||
syntax "php" "\.php[2345s~]?$"
|
||||
magic "PHP script text"
|
||||
|
||||
## php markings
|
||||
# PHP markings.
|
||||
color brightgreen "(<\?(php)?|\?>)"
|
||||
|
||||
## functions
|
||||
# Functions.
|
||||
color white "\<[a-z_]*\("
|
||||
|
||||
## types
|
||||
# Types.
|
||||
color green "\<(var|float|global|double|bool|char|int|enum|const)\>"
|
||||
|
||||
## structure
|
||||
# Structure.
|
||||
color brightyellow "\<(class|new|private|public|function|for|foreach|if|while|do|else|elseif|case|default|switch)\>"
|
||||
|
||||
## control flow
|
||||
# Control flow.
|
||||
color magenta "\<(goto|continue|break|return)\>"
|
||||
|
||||
## strings
|
||||
# Strings.
|
||||
color brightyellow "<[^= ]*>" ""(\.|[^"])*""
|
||||
|
||||
## comments
|
||||
# Comments.
|
||||
color brightblue "//.*"
|
||||
color brightblue start="/\*" end="\*/"
|
||||
#color blue start="<" end=">"
|
||||
#color red "&[^;[[:space:]]]*;"
|
||||
##color blue start="<" end=">"
|
||||
##color red "&[^;[[:space:]]]*;"
|
||||
|
||||
## Trailing whitespace
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
|
||||
27
doc/syntax/po.nanorc
Normal file
27
doc/syntax/po.nanorc
Normal file
@@ -0,0 +1,27 @@
|
||||
## Colouring for PO files.
|
||||
|
||||
syntax "po" "\.pot?$"
|
||||
|
||||
# Comments.
|
||||
color green "^#.*$"
|
||||
color yellow "Copyright|\(C\)"
|
||||
# Header fields.
|
||||
color brightmagenta "\<(Project\-Id\-Version|Report\-Msgid\-Bugs\-To|Last\-Translator|Language\-Team|Language|X\-Generator|Plural\-Forms)\>"
|
||||
color cyan "\<(POT\-Creation\-Date|PO\-Revision\-Date|MIME\-Version|Content\-Type|Content\-Transfer\-Encoding)\>"
|
||||
# Encodings and numbers.
|
||||
color yellow "\<(UTF|ISO|Windows|Mac|IBM)\>\-[0-9]"
|
||||
color yellow "[0-9]|pre[0-9]|[0-9]bit"
|
||||
# Msgids.
|
||||
color brightblue "\<(msgid|msgid_plural|msgstr)\>"
|
||||
# Tags.
|
||||
color red "\<fuzzy\>"
|
||||
color yellow "\<c-format\>"
|
||||
# Format specifiers.
|
||||
color brightmagenta "%([1-9]\$)?[a-z]*"
|
||||
# Quotes and newlines.
|
||||
color yellow "\""
|
||||
color cyan "\\n"
|
||||
# Reminders.
|
||||
color ,yellow "(FIXME|TODO|XXX)"
|
||||
# Obsolete strings.
|
||||
color red "#~.*$"
|
||||
@@ -1,6 +1,7 @@
|
||||
## Here is an example for POV-Ray.
|
||||
##
|
||||
|
||||
syntax "pov" "\.(pov|POV|povray|POVRAY)$"
|
||||
|
||||
color brightcyan "^[[:space:]]*#[[:space:]]*(declare)"
|
||||
color brightyellow "\<(sphere|cylinder|translate|matrix|rotate|scale)\>"
|
||||
color brightyellow "\<(orthographic|location|up|right|direction|clipped_by)\>"
|
||||
@@ -10,6 +11,7 @@ color brightred "\<(light_source|background)\>"
|
||||
color brightred "\<(fog|object|camera)\>"
|
||||
color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
|
||||
color brightmagenta "\<(union|group|subgroup)\>"
|
||||
## Comment highlighting
|
||||
|
||||
# Comments.
|
||||
color brightblue "//.*"
|
||||
color brightblue start="/\*" end="\*/"
|
||||
|
||||
@@ -1,10 +1,24 @@
|
||||
## Here is an example for Python.
|
||||
##
|
||||
|
||||
syntax "python" "\.py$"
|
||||
header "^#!.*/python[-0-9._]*"
|
||||
|
||||
# Function definitions.
|
||||
icolor brightblue "def [0-9A-Z_]+"
|
||||
# Keywords.
|
||||
color brightcyan "\<(and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield)\>"
|
||||
|
||||
# Strings.
|
||||
color brightgreen "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}"
|
||||
color brightgreen "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}"
|
||||
color brightgreen start=""""[^"]" end=""""" start="'''[^']" end="'''"
|
||||
color brightred "#.*$"
|
||||
# Multiline strings.
|
||||
color brightgreen start="\"\"\"([^"),]|$)" end="(^|[^(])\"\"\""
|
||||
color brightgreen start="'''([^'),]|$)" end="(^|[^(])'''"
|
||||
|
||||
# Comments.
|
||||
color brightred "(^|[[:blank:]])#.*$"
|
||||
# Reminders.
|
||||
color ,yellow "(FIXME|TODO|XXX)"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
|
||||
@@ -1,31 +1,32 @@
|
||||
## Here is an example for Ruby.
|
||||
##
|
||||
|
||||
syntax "ruby" "\.rb$"
|
||||
header "^#!.*/ruby[-0-9._]*"
|
||||
## Asciibetical list of reserved words
|
||||
|
||||
# Asciibetical list of reserved words.
|
||||
color yellow "\<(BEGIN|END|alias|and|begin|break|case|class|def|defined\?|do|else|elsif|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\>"
|
||||
## Constants
|
||||
# Constants.
|
||||
color brightblue "(\$|@|@@)?\<[A-Z]+[0-9A-Z_a-z]*"
|
||||
## Ruby "symbols"
|
||||
# Ruby "symbols".
|
||||
icolor magenta "([ ]|^):[0-9A-Z_]+\>"
|
||||
## Some unique things we want to stand out
|
||||
# Some unique things we want to stand out.
|
||||
color brightyellow "\<(__FILE__|__LINE__)\>"
|
||||
## Regular expressions
|
||||
# Regular expressions.
|
||||
color brightmagenta "/([^/]|(\\/))*/[iomx]*" "%r\{([^}]|(\\}))*\}[iomx]*"
|
||||
## Shell command expansion is in `backticks` or like %x{this}. These are
|
||||
## "double-quotish" (to use a perlism).
|
||||
# Shell command expansion is in `backticks` or like %x{this}. These are
|
||||
# "double-quotish" (to use a perlism).
|
||||
color brightblue "`[^`]*`" "%x\{[^}]*\}"
|
||||
## Strings, double-quoted
|
||||
# Strings, double-quoted.
|
||||
color green ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
|
||||
## Expression substitution. These go inside double-quoted strings,
|
||||
## "like #{this}".
|
||||
# Expression substitution. These go inside double-quoted strings,
|
||||
# "like #{this}".
|
||||
color brightgreen "#\{[^}]*\}"
|
||||
## Strings, single-quoted
|
||||
# Strings, single-quoted.
|
||||
color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
|
||||
## Comments
|
||||
# Comments.
|
||||
color cyan "#[^{].*$" "#$"
|
||||
color brightcyan "##[^{].*$" "##$"
|
||||
## "Here" docs
|
||||
# "Here" docs.
|
||||
color green start="<<-?'?EOT'?" end="^EOT"
|
||||
## Some common markers
|
||||
# Some common markers.
|
||||
color brightcyan "(XXX|TODO|FIXME|\?\?\?)"
|
||||
|
||||
@@ -1,15 +1,27 @@
|
||||
## Here is an example for Bourne shell scripts.
|
||||
##
|
||||
|
||||
syntax "sh" "\.sh$"
|
||||
magic "(POSIX|Bourne.*) shell script text"
|
||||
header "^#!.*/(ba|k|pdk)?sh[-0-9_]*"
|
||||
magic "(POSIX|Bourne.*) shell script text"
|
||||
|
||||
icolor brightgreen "^[0-9A-Z_]+\(\)"
|
||||
color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>"
|
||||
color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
|
||||
color green "\<(break|case|continue|do|done|elif|else|esac|exit|fi|for|function|if|in|read|return|select|shift|then|time|until|while)\>"
|
||||
color green "\<(declare|eval|exec|export|let|local)\>"
|
||||
color green "[{}():;|`$<>!=&\\]" "(\]|\[)"
|
||||
color green "-[Ldefgruwx]\>"
|
||||
color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
|
||||
color brightblue "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|install|let|ln|make|mkdir|mv|rm|sed|set|tar|touch|umask|unset)\>"
|
||||
icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?"
|
||||
color brightblue "\<(awk|cat|cd|ch(grp|mod|own)|cp|echo|env|grep|install|ln|make|mkdir|mv|popd|printf|pushd|rm|rmdir|sed|set|tar|touch|umask|unset)\>"
|
||||
|
||||
# Basic variable names (no braces).
|
||||
color brightred "\$[-0-9@*#?$!]" "\$[[:alpha:]_][[:alnum:]_]*"
|
||||
# More complicated variable names; handles braces and replacements and arrays.
|
||||
color brightred "\$\{[#!]?([-@*#?$!]|[0-9]+|[[:alpha:]_][[:alnum:]_]*)(\[([[:space:]]*[[:alnum:]_]+[[:space:]]*|@)\])?(([#%/]|:?[-=?+])[^}]*\}|\[|\})"
|
||||
|
||||
# Comments.
|
||||
color cyan "(^|[[:space:]])#.*$"
|
||||
|
||||
# Strings.
|
||||
color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
|
||||
39
doc/syntax/spec.nanorc
Normal file
39
doc/syntax/spec.nanorc
Normal file
@@ -0,0 +1,39 @@
|
||||
## Syntax highlighting for RPM spec files.
|
||||
|
||||
syntax "spec" "\.(spec$|spec\.*)"
|
||||
|
||||
# Main tags.
|
||||
color brightblue "((Icon|ExclusiveOs|ExcludeOs)[[:space:]]*:)"
|
||||
color brightblue "((BuildArch|BuildArchitectures|ExclusiveArch|ExcludeArch)[[:space:]]*:)"
|
||||
color brightblue "((Conflicts|Obsoletes|Provides|Requires|Requires\(.*\)|Enhances|Suggests|BuildConflicts|BuildRequires|Recommends|PreReq|Supplements)[[:space:]]*:)"
|
||||
color brightblue "((Epoch|Serial|Nosource|Nopatch)[[:space:]]*:)"
|
||||
color brightblue "((AutoReq|AutoProv|AutoReqProv)[[:space:]]*:)"
|
||||
color brightblue "((Copyright|License|Summary|Summary\(.*\)|Distribution|Vendor|Packager|Group|Source\d*|Patch\d*|BuildRoot|Prefix)[[:space:]]*:)"
|
||||
color brightblue "((Name|Version|Release|Url|URL)[[:space:]]*:)"
|
||||
color brightblue start="^Source" end=":" start="^Patch" end=":"
|
||||
# Architectures.
|
||||
color brightred "(i386|i486|i586|i686|athlon|ia64|alpha|alphaev5|alphaev56|alphapca56|alphaev6|alphaev67|sparc|sparcv9|sparc64armv3l|armv4b|armv4lm|ips|mipsel|ppc|ppc|iseries|ppcpseries|ppc64|m68k|m68kmint|Sgi|rs6000|i370|s390x|s390|noarch)"
|
||||
# Architecture conditionals.
|
||||
color brightred "(ifarch|ifnarch)"
|
||||
# OS conditionals.
|
||||
color brightred "(ifos|ifnos)"
|
||||
# %* strings.
|
||||
color green "%([A-Z_a-z_0-9_]*)"
|
||||
color magenta "%_([A-Z_a-z_0-9_]*)"
|
||||
color yellow start="%__" end="\ "
|
||||
color magenta start="%\{" end="\}"
|
||||
color yellow start="%\{__" end="\}"
|
||||
# Sections.
|
||||
color red "^%(build$|changelog|check$|clean$|description|files|install$|package|pre|prep$|preun|post|postun)"
|
||||
color red "^%(trigger|triggerin|triggerpostun|triggerun|verifyscript)"
|
||||
# Conditionals and defines.
|
||||
color brightred "%(if|else|endif|define|global|undefine)"
|
||||
|
||||
# Comments.
|
||||
color cyan "#.*$"
|
||||
# Special case: "# norootforbuild" is handled as main tag.
|
||||
color brightblue "^# norootforbuild"
|
||||
# %changelog date entries.
|
||||
color brightyellow "^\* .*\)$"
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
@@ -1,13 +1,15 @@
|
||||
## Syntax highlighting for Tcl files.
|
||||
|
||||
syntax "tcl" "\.tcl$"
|
||||
|
||||
## Standard Tcl [info commands]
|
||||
# Standard Tcl [info commands]:
|
||||
color green "\<(after|append|array|auto_execok|auto_import|auto_load|auto_load_index|auto_qualify|binary|break|case|catch|cd|clock|close|concat|continue|encoding|eof|error|eval|exec|exit|expr|fblocked|fconfigure|fcopy|file|fileevent|flush|for|foreach|format|gets|glob|global|history|if|incr|info|interp|join|lappend|lindex|linsert|list|llength|load|lrange|lreplace|lsearch|lset|lsort|namespace|open|package|pid|puts|pwd|read|regexp|regsub|rename|return|scan|seek|set|socket|source|split|string|subst|switch|tclLog|tell|time|trace|unknown|unset|update|uplevel|upvar|variable|vwait|while)\>"
|
||||
## Basic Tcl sub commands.
|
||||
# Basic Tcl subcommands:
|
||||
color green "\<(array anymore|array donesearch|array exists|array get|array names|array nextelement|array set|array size|array startsearch|array statistics|array unset)\>"
|
||||
color green "\<(string bytelength|string compare|string equal|string first|string index|string is|string last|string length|string map|string match|string range|string repeat|string replace|string to|string tolower|string totitle|string toupper|string trim|string trimleft|string trimright|string will|string wordend|string wordstart)\>"
|
||||
## Extended TclX [info commands]
|
||||
# Extended TclX [info commands]:
|
||||
color green "\<(alarm|auto_load_pkg|bsearch|catclose|catgets|catopen|ccollate|cconcat|cequal|chgrp|chmod|chown|chroot|cindex|clength|cmdtrace|commandloop|crange|csubstr|ctoken|ctype|dup|echo|execl|fcntl|flock|fork|fstat|ftruncate|funlock|host_info|id|infox|keyldel|keylget|keylkeys|keylset|kill|lassign|lcontain|lempty|lgets|link|lmatch|loadlibindex|loop|lvarcat|lvarpop|lvarpush|max|min|nice|pipe|profile|random|readdir|replicate|scancontext|scanfile|scanmatch|select|server_accept|server_create|signal|sleep|sync|system|tclx_findinit|tclx_fork|tclx_load_tndxs|tclx_sleep|tclx_system|tclx_wait|times|translit|try_eval|umask|wait)\>"
|
||||
## Syntax.
|
||||
# Syntax:
|
||||
color brightblue "proc[[:space:]]" "(\{|\})"
|
||||
color green "(\(|\)|\;|`|\\|\$|<|>|!|=|&|\|)"
|
||||
color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
## Here is a short example for TeX files.
|
||||
##
|
||||
|
||||
syntax "tex" "\.tex$"
|
||||
|
||||
icolor green "\\.|\\[A-Z]*"
|
||||
color magenta "[{}]"
|
||||
color blue "(^|[^\])%.*"
|
||||
|
||||
20
doc/syntax/texinfo.nanorc
Normal file
20
doc/syntax/texinfo.nanorc
Normal file
@@ -0,0 +1,20 @@
|
||||
## Here is an example for Texinfo files.
|
||||
|
||||
syntax "texinfo" "\.texi$"
|
||||
header "^\\input texinfo"
|
||||
magic "Texinfo source text"
|
||||
|
||||
# Command arguments, trailing and enclosed.
|
||||
color cyan "^@[a-z]+[[:space:]]+.*$"
|
||||
color brightmagenta "@[a-z]+\{[^}]*\}"
|
||||
# Commands themselves.
|
||||
color yellow "@[a-z]+\{?" "\}"
|
||||
|
||||
# Menu items.
|
||||
color brightred "^\*[[:space:]]+.*::.*$"
|
||||
|
||||
# Comments.
|
||||
color green "@c[[:space:]]+.*$"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
@@ -1,7 +1,8 @@
|
||||
## Here is an example for xml files.
|
||||
##
|
||||
## Here is an example for XML files.
|
||||
|
||||
syntax "xml" "\.([jrs]html?|sgml?|xml|xslt?)$"
|
||||
magic "XML.*document text"
|
||||
magic "(XML|SGML) (sub)?document text"
|
||||
|
||||
color green start="<" end=">"
|
||||
color cyan "<[^> ]+"
|
||||
color cyan ">"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
74
m4/ax_check_compile_flag.m4
Normal file
74
m4/ax_check_compile_flag.m4
Normal file
@@ -0,0 +1,74 @@
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check whether the given FLAG works with the current language's compiler
|
||||
# or gives an error. (Warnings, however, are ignored)
|
||||
#
|
||||
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
||||
# success/failure.
|
||||
#
|
||||
# If EXTRA-FLAGS is defined, it is added to the current language's default
|
||||
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
|
||||
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
|
||||
# force the compiler to issue an error when a bad flag is given.
|
||||
#
|
||||
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
|
||||
#
|
||||
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
|
||||
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License, or (at your
|
||||
# option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 3
|
||||
|
||||
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
|
||||
[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
|
||||
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
|
||||
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
|
||||
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
|
||||
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
|
||||
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
|
||||
[AS_VAR_SET(CACHEVAR,[yes])],
|
||||
[AS_VAR_SET(CACHEVAR,[no])])
|
||||
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
|
||||
AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
|
||||
[m4_default([$2], :)],
|
||||
[m4_default([$3], :)])
|
||||
AS_VAR_POPDEF([CACHEVAR])dnl
|
||||
])dnl AX_CHECK_COMPILE_FLAGS
|
||||
@@ -8,7 +8,7 @@ sub combinations {
|
||||
return @rest, map { [$first, @$_] } @rest;
|
||||
}
|
||||
|
||||
my @allargs=("--enable-debug", "--disable-wrapping", "--disable-justify", "--disable-extra", "--enable-tiny", "--disable-browser --disable-help --disable-mouse --disable-operatingdir --disable-speller", "--disable-multibuffer", "--disable-nanorc", "--with-slang");
|
||||
my @allargs=("--enable-debug", "--disable-wrapping", "--disable-justify", "--disable-extra", "--enable-tiny", "--disable-utf8", "--disable-multibuffer", "--disable-nanorc", "--with-slang");
|
||||
my @combos = combinations(@allargs);
|
||||
|
||||
my $i = 0;
|
||||
|
||||
@@ -21,7 +21,7 @@ Pico text editor while also offering a few enhancements.
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
%configure --enable-all
|
||||
%configure
|
||||
make
|
||||
|
||||
%install
|
||||
|
||||
25
po/ChangeLog
25
po/ChangeLog
@@ -1,3 +1,28 @@
|
||||
2014-05-28 Benno Schulenberg <bensberg@justemail.net>
|
||||
* de.po, eo.po, nl.po: Updates for German, Dutch, and Esperanto.
|
||||
|
||||
2014-05-27 Benno Schulenberg <bensberg@justemail.net>
|
||||
* de.po, nl.po, ru.po: Updates for Russian, Dutch, and German.
|
||||
|
||||
2014-05-25 Benno Schulenberg <bensberg@justemail.net>
|
||||
* it.po, uk.po: Updates from the TP for Ukrainian and Italian.
|
||||
|
||||
2014-05-22 Benno Schulenberg <bensberg@justemail.net>
|
||||
* de.po, uk.po: Updates from the TP for German and Ukrainian.
|
||||
|
||||
2014-05-16 Benno Schulenberg <bensberg@justemail.net>
|
||||
* eo.po, fi.po, fr.po, nl.po, vi.po: Updates from the TP for
|
||||
Vietnamese, Finnish, Dutch, French, and Esperanto.
|
||||
|
||||
2014-05-13 Benno Schulenberg <bensberg@justemail.net>
|
||||
* nano.pot, *.po: Regenerated the POT file and refreshed the PO's.
|
||||
|
||||
2014-03-22 Benno Schulenberg <bensberg@justemail.net>
|
||||
* nano.pot: Regenerated the POT file.
|
||||
* cs.po, es.po, it.po, nb.po, sr.po, zh_TW: Updates from the TP
|
||||
for Czech, Spanish, Italian, Norwegian, Serbian, and Chinese.
|
||||
* LINGUAS: Removed rw (Kinyarwanda) -- it was just fragments.
|
||||
|
||||
2007-12-09 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* LINGUAS: Add zh_CN.
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# List of available languages.
|
||||
bg ca cs da de es eu fi fr ga gl hu id it ms nb nl nn pl pt_BR ro ru rw sr sv tr uk vi zh_CN zh_TW
|
||||
bg ca cs da de eo es eu fi fr ga gl hu id it ja ms nb nl nn pl pt_BR ro ru sl sr sv tr uk vi zh_CN zh_TW
|
||||
|
||||
1347
po/nano.pot
1347
po/nano.pot
File diff suppressed because it is too large
Load Diff
1493
po/pt_BR.po
1493
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
21
po/update_linguas.sh
Executable file
21
po/update_linguas.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
echo "Updating translations via TP" && \
|
||||
rsync -Lrtvz translationproject.org::tp/latest/nano/ .
|
||||
#
|
||||
NEWSTUFF=`svn status | grep "^\? .*.po$" | awk '{ print $NF }'`
|
||||
if [ "x$NEWSTUFF" != "x" ]; then
|
||||
echo "Adding new languaes to SVN"
|
||||
svn add $NEWSTUFF
|
||||
fi
|
||||
#
|
||||
echo "Updating LINGUAS for all translations"
|
||||
FILE=LINGUAS
|
||||
echo "# List of available languages." >$FILE
|
||||
/bin/ls *.po | tr '\n' ' ' | sed 's/\.po//g' >>$FILE
|
||||
echo >> $FILE
|
||||
#
|
||||
if [ "x$NEWSTUFF" != "x" ]; then
|
||||
echo -n "New langs found, re-running configure and make at top level (silently)..."
|
||||
(cd .. && ./configure && make) >/dev/null
|
||||
echo "done"
|
||||
fi
|
||||
1944
po/zh_CN.po
1944
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
2319
po/zh_TW.po
2319
po/zh_TW.po
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,4 @@
|
||||
localedir = $(datadir)/locale
|
||||
INCLUDES = -DLOCALEDIR=\"$(localedir)\" -DSYSCONFDIR=\"$(sysconfdir)\"
|
||||
AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -DSYSCONFDIR=\"$(sysconfdir)\"
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
/**************************************************************************
|
||||
* browser.c *
|
||||
* *
|
||||
* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 *
|
||||
* Free Software Foundation, Inc. *
|
||||
* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, *
|
||||
* 2010, 2011, 2013, 2014 Free Software Foundation, Inc. *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 3, or (at your option) *
|
||||
@@ -161,8 +161,8 @@ char *do_browser(char *path, DIR *dir)
|
||||
}
|
||||
#endif /* !DISABLE_MOUSE */
|
||||
|
||||
parse_browser_input(&kbinput, &meta_key, &func_key);
|
||||
s = get_shortcut(MBROWSER, &kbinput, &meta_key, &func_key);
|
||||
parse_browser_input(&kbinput, &meta_key);
|
||||
s = get_shortcut(MBROWSER, &kbinput, &meta_key);
|
||||
if (!s)
|
||||
continue;
|
||||
f = sctofunc((sc *) s);
|
||||
@@ -173,10 +173,10 @@ char *do_browser(char *path, DIR *dir)
|
||||
total_redraw();
|
||||
} else if (f->scfunc == do_help_void) {
|
||||
#ifndef DISABLE_HELP
|
||||
do_browser_help();
|
||||
do_help_void();
|
||||
curs_set(0);
|
||||
#else
|
||||
nano_disabled_msg();
|
||||
nano_disabled_msg();
|
||||
#endif
|
||||
/* Search for a filename. */
|
||||
} else if (f->scfunc == do_search) {
|
||||
@@ -217,7 +217,8 @@ char *do_browser(char *path, DIR *dir)
|
||||
#ifndef NANO_TINY
|
||||
NULL,
|
||||
#endif
|
||||
browser_refresh, N_("Go To Directory"));
|
||||
/* TRANSLATORS: This is a prompt. */
|
||||
browser_refresh, _("Go To Directory"));
|
||||
|
||||
curs_set(0);
|
||||
#if !defined(DISABLE_HELP) || !defined(DISABLE_MOUSE)
|
||||
@@ -540,29 +541,27 @@ void browser_init(const char *path, DIR *dir)
|
||||
}
|
||||
|
||||
/* Determine the shortcut key corresponding to the values of kbinput
|
||||
* (the key itself), meta_key (whether the key is a meta sequence), and
|
||||
* func_key (whether the key is a function key), if any. In the
|
||||
* process, convert certain non-shortcut keys into their corresponding
|
||||
* (the key itself) and meta_key (whether the key is a meta sequence).
|
||||
* Also convert certain non-shortcut keys into their corresponding
|
||||
* shortcut keys. */
|
||||
void parse_browser_input(int *kbinput, bool *meta_key, bool *func_key)
|
||||
void parse_browser_input(int *kbinput, bool *meta_key)
|
||||
{
|
||||
get_shortcut(MBROWSER, kbinput, meta_key, func_key);
|
||||
get_shortcut(MBROWSER, kbinput, meta_key);
|
||||
|
||||
/* Pico compatibility. */
|
||||
if (!*meta_key) {
|
||||
switch (*kbinput) {
|
||||
case ' ':
|
||||
*kbinput = sc_seq_or(do_page_down, 0);
|
||||
*kbinput = KEY_NPAGE;
|
||||
break;
|
||||
case '-':
|
||||
*kbinput = sc_seq_or(do_page_up, 0);
|
||||
*kbinput = KEY_PPAGE;
|
||||
break;
|
||||
case '?':
|
||||
#ifndef DISABLE_HELP
|
||||
*kbinput = sc_seq_or(do_help_void, 0);
|
||||
#endif
|
||||
break;
|
||||
/* Cancel equivalent to Exit here. */
|
||||
case 'E':
|
||||
case 'e':
|
||||
*kbinput = sc_seq_or(do_exit, 0);
|
||||
@@ -635,7 +634,7 @@ void browser_refresh(void)
|
||||
/* Start highlighting the currently selected file or
|
||||
* directory. */
|
||||
if (i == selected)
|
||||
wattron(edit, reverse_attr);
|
||||
wattron(edit, hilite_attribute);
|
||||
|
||||
blank_line(edit, line, col, longest);
|
||||
|
||||
@@ -710,7 +709,7 @@ void browser_refresh(void)
|
||||
/* Finish highlighting the currently selected file or
|
||||
* directory. */
|
||||
if (i == selected)
|
||||
wattroff(edit, reverse_attr);
|
||||
wattroff(edit, hilite_attribute);
|
||||
|
||||
free(foo);
|
||||
|
||||
@@ -794,29 +793,23 @@ int filesearch_init(void)
|
||||
TRUE,
|
||||
#endif
|
||||
MWHEREISFILE, backupstring,
|
||||
&meta_key, &func_key,
|
||||
&meta_key, &func_key,
|
||||
#ifndef NANO_TINY
|
||||
&search_history,
|
||||
#endif
|
||||
browser_refresh, "%s%s%s%s%s%s", _("Search"),
|
||||
browser_refresh, "%s%s%s%s%s", _("Search"),
|
||||
#ifndef NANO_TINY
|
||||
/* This string is just a modifier for the search prompt; no
|
||||
* grammar is implied. */
|
||||
ISSET(CASE_SENSITIVE) ? _(" [Case Sensitive]") :
|
||||
#endif
|
||||
"",
|
||||
#ifdef HAVE_REGEX_H
|
||||
/* This string is just a modifier for the search prompt; no
|
||||
* grammar is implied. */
|
||||
ISSET(USE_REGEXP) ? _(" [Regexp]") :
|
||||
#endif
|
||||
"",
|
||||
#ifndef NANO_TINY
|
||||
/* This string is just a modifier for the search prompt; no
|
||||
* grammar is implied. */
|
||||
ISSET(BACKWARDS_SEARCH) ? _(" [Backwards]") :
|
||||
#endif
|
||||
"", "", buf);
|
||||
"", buf);
|
||||
|
||||
/* Release buf now that we don't need it anymore. */
|
||||
free(buf);
|
||||
@@ -830,7 +823,7 @@ int filesearch_init(void)
|
||||
statusbar(_("Cancelled"));
|
||||
return -1;
|
||||
} else {
|
||||
s = get_shortcut(MBROWSER, &i, &meta_key, &func_key);
|
||||
s = get_shortcut(MBROWSER, &i, &meta_key);
|
||||
if (i == -2 || i == 0) {
|
||||
#ifdef HAVE_REGEX_H
|
||||
/* Use last_search if answer is an empty string, or
|
||||
@@ -845,7 +838,7 @@ int filesearch_init(void)
|
||||
TOGGLE(CASE_SENSITIVE);
|
||||
backupstring = mallocstrcpy(backupstring, answer);
|
||||
return 1;
|
||||
} else if (s && s->scfunc == backwards_void) {
|
||||
} else if (s && s->scfunc == backwards_void) {
|
||||
TOGGLE(BACKWARDS_SEARCH);
|
||||
backupstring = mallocstrcpy(backupstring, answer);
|
||||
return 1;
|
||||
@@ -1070,7 +1063,7 @@ char *striponedir(const char *path)
|
||||
tmp = strrchr(retval, '/');
|
||||
|
||||
if (tmp != NULL)
|
||||
null_at(&retval, tmp - retval);
|
||||
null_at(&retval, tmp - retval);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
50
src/chars.c
50
src/chars.c
@@ -2,8 +2,8 @@
|
||||
/**************************************************************************
|
||||
* chars.c *
|
||||
* *
|
||||
* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 *
|
||||
* Free Software Foundation, Inc. *
|
||||
* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, *
|
||||
* 2010, 2011, 2013, 2014 Free Software Foundation, Inc. *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 3, or (at your option) *
|
||||
@@ -54,7 +54,19 @@ bool using_utf8(void)
|
||||
{
|
||||
return use_utf8;
|
||||
}
|
||||
#endif
|
||||
#endif /* ENABLE_UTF8 */
|
||||
|
||||
/* Concatenate two allocated strings. */
|
||||
char* addstrings(char* str1, size_t len1, char* str2, size_t len2)
|
||||
{
|
||||
str1 = charealloc(str1, len1 + len2 + 1);
|
||||
str1[len1] = '\0';
|
||||
strncat(&str1[len1], str2, len2);
|
||||
free(str2);
|
||||
|
||||
return str1;
|
||||
}
|
||||
|
||||
|
||||
#ifndef HAVE_ISBLANK
|
||||
/* This function is equivalent to isblank(). */
|
||||
@@ -79,12 +91,12 @@ bool is_byte(int c)
|
||||
return ((unsigned int)c == (unsigned char)c);
|
||||
}
|
||||
|
||||
static void mbtowc_reset(void)
|
||||
void mbtowc_reset(void)
|
||||
{
|
||||
IGNORE_CALL_RESULT(mbtowc(NULL, NULL, 0));
|
||||
}
|
||||
|
||||
static void wctomb_reset(void)
|
||||
void wctomb_reset(void)
|
||||
{
|
||||
IGNORE_CALL_RESULT(wctomb(NULL, 0));
|
||||
}
|
||||
@@ -184,9 +196,8 @@ bool is_punct_mbchar(const char *c)
|
||||
#ifdef ENABLE_UTF8
|
||||
if (use_utf8) {
|
||||
wchar_t wc;
|
||||
int c_mb_len = mbtowc(&wc, c, MB_CUR_MAX);
|
||||
|
||||
if (c_mb_len < 0) {
|
||||
if (mbtowc(&wc, c, MB_CUR_MAX) < 0) {
|
||||
mbtowc_reset();
|
||||
wc = bad_wchar;
|
||||
}
|
||||
@@ -473,22 +484,18 @@ int parse_mbchar(const char *buf, char *chr, size_t *col)
|
||||
* before the one at pos. */
|
||||
size_t move_mbleft(const char *buf, size_t pos)
|
||||
{
|
||||
size_t pos_prev = pos;
|
||||
size_t before = 0, char_len = 0;
|
||||
|
||||
assert(buf != NULL && pos <= strlen(buf));
|
||||
|
||||
/* There is no library function to move backward one multibyte
|
||||
* character. Here is the naive, O(pos) way to do it. */
|
||||
while (TRUE) {
|
||||
int buf_mb_len = parse_mbchar(buf + pos - pos_prev, NULL, NULL);
|
||||
|
||||
if (pos_prev <= buf_mb_len)
|
||||
break;
|
||||
|
||||
pos_prev -= buf_mb_len;
|
||||
while (before < pos) {
|
||||
char_len = parse_mbchar(buf + before, NULL, NULL);
|
||||
before += char_len;
|
||||
}
|
||||
|
||||
return pos - pos_prev;
|
||||
return before - char_len;
|
||||
}
|
||||
|
||||
/* Return the index in buf of the beginning of the multibyte character
|
||||
@@ -788,9 +795,8 @@ char *mbstrchr(const char *s, const char *c)
|
||||
char *s_mb = charalloc(MB_CUR_MAX);
|
||||
const char *q = s;
|
||||
wchar_t ws, wc;
|
||||
int c_mb_len = mbtowc(&wc, c, MB_CUR_MAX);
|
||||
|
||||
if (c_mb_len < 0) {
|
||||
if (mbtowc(&wc, c, MB_CUR_MAX) < 0) {
|
||||
mbtowc_reset();
|
||||
wc = (unsigned char)*c;
|
||||
bad_c_mb = TRUE;
|
||||
@@ -893,7 +899,7 @@ char *mbrevstrpbrk(const char *s, const char *accept, const char
|
||||
}
|
||||
#endif /* !NANO_TINY */
|
||||
|
||||
#if defined(ENABLE_NANORC) && (!defined(NANO_TINY) || !defined(DISABLE_JUSTIFY))
|
||||
#if !defined(DISABLE_NANORC) && (!defined(NANO_TINY) || !defined(DISABLE_JUSTIFY))
|
||||
/* Return TRUE if the string s contains one or more blank characters,
|
||||
* and FALSE otherwise. */
|
||||
bool has_blank_chars(const char *s)
|
||||
@@ -935,7 +941,7 @@ bool has_blank_mbchars(const char *s)
|
||||
#endif
|
||||
return has_blank_chars(s);
|
||||
}
|
||||
#endif /* ENABLE_NANORC && (!NANO_TINY || !DISABLE_JUSTIFY) */
|
||||
#endif /* !DISABLE_NANORC && (!NANO_TINY || !DISABLE_JUSTIFY) */
|
||||
|
||||
#ifdef ENABLE_UTF8
|
||||
/* Return TRUE if wc is valid Unicode, and FALSE otherwise. */
|
||||
@@ -947,7 +953,7 @@ bool is_valid_unicode(wchar_t wc)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_NANORC
|
||||
#ifndef DISABLE_NANORC
|
||||
/* Check if the string s is a valid multibyte string. Return TRUE if it
|
||||
* is, and FALSE otherwise. */
|
||||
bool is_valid_mbstring(const char *s)
|
||||
@@ -960,4 +966,4 @@ bool is_valid_mbstring(const char *s)
|
||||
#endif
|
||||
TRUE;
|
||||
}
|
||||
#endif /* ENABLE_NANORC */
|
||||
#endif /* !DISABLE_NANORC */
|
||||
|
||||
242
src/color.c
242
src/color.c
@@ -2,8 +2,8 @@
|
||||
/**************************************************************************
|
||||
* color.c *
|
||||
* *
|
||||
* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 *
|
||||
* Free Software Foundation, Inc. *
|
||||
* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, *
|
||||
* 2010, 2011, 2013, 2014 Free Software Foundation, Inc. *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 3, or (at your option) *
|
||||
@@ -31,17 +31,53 @@
|
||||
#include <magic.h>
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_COLOR
|
||||
#ifndef DISABLE_COLOR
|
||||
|
||||
/* For each syntax list entry, go through the list of colors and assign
|
||||
* the color pairs. */
|
||||
void set_colorpairs(void)
|
||||
{
|
||||
const syntaxtype *this_syntax = syntaxes;
|
||||
bool defok = FALSE;
|
||||
short fg, bg;
|
||||
size_t i;
|
||||
|
||||
start_color();
|
||||
|
||||
#ifdef HAVE_USE_DEFAULT_COLORS
|
||||
/* Use the default colors, if available. */
|
||||
defok = (use_default_colors() != ERR);
|
||||
#endif
|
||||
|
||||
for (i = 0; i < NUMBER_OF_ELEMENTS; i++) {
|
||||
bool bright = FALSE;
|
||||
|
||||
if (parse_color_names(specified_color_combo[i], &fg, &bg, &bright)) {
|
||||
if (fg == -1 && !defok)
|
||||
fg = COLOR_WHITE;
|
||||
if (bg == -1 && !defok)
|
||||
bg = COLOR_BLACK;
|
||||
init_pair(i + 1, fg, bg);
|
||||
interface_color_pair[i].bright = bright;
|
||||
interface_color_pair[i].pairnum = COLOR_PAIR(i + 1);
|
||||
}
|
||||
else {
|
||||
interface_color_pair[i].bright = FALSE;
|
||||
if (i != FUNCTION_TAG)
|
||||
interface_color_pair[i].pairnum = hilite_attribute;
|
||||
else
|
||||
interface_color_pair[i].pairnum = A_NORMAL;
|
||||
}
|
||||
|
||||
if (specified_color_combo[i] != NULL) {
|
||||
free(specified_color_combo[i]);
|
||||
specified_color_combo[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
for (; this_syntax != NULL; this_syntax = this_syntax->next) {
|
||||
colortype *this_color = this_syntax->color;
|
||||
int color_pair = 1;
|
||||
int clr_pair = NUMBER_OF_ELEMENTS + 1;
|
||||
|
||||
for (; this_color != NULL; this_color = this_color->next) {
|
||||
const colortype *beforenow = this_syntax->color;
|
||||
@@ -56,8 +92,8 @@ void set_colorpairs(void)
|
||||
if (beforenow != this_color)
|
||||
this_color->pairnum = beforenow->pairnum;
|
||||
else {
|
||||
this_color->pairnum = color_pair;
|
||||
color_pair++;
|
||||
this_color->pairnum = clr_pair;
|
||||
clr_pair++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -70,15 +106,9 @@ void color_init(void)
|
||||
|
||||
if (has_colors()) {
|
||||
const colortype *tmpcolor;
|
||||
#ifdef HAVE_USE_DEFAULT_COLORS
|
||||
bool defok;
|
||||
#endif
|
||||
|
||||
start_color();
|
||||
|
||||
#ifdef HAVE_USE_DEFAULT_COLORS
|
||||
/* Use the default colors, if available. */
|
||||
defok = (use_default_colors() != ERR);
|
||||
bool defok = (use_default_colors() != ERR);
|
||||
#endif
|
||||
|
||||
for (tmpcolor = openfile->colorstrings; tmpcolor != NULL;
|
||||
@@ -107,7 +137,7 @@ void color_init(void)
|
||||
}
|
||||
}
|
||||
|
||||
/* Cleanup a regex we previously compiled */
|
||||
/* Clean up a regex we previously compiled. */
|
||||
void nfreeregex(regex_t **r)
|
||||
{
|
||||
assert(r != NULL);
|
||||
@@ -123,16 +153,14 @@ void color_update(void)
|
||||
syntaxtype *tmpsyntax;
|
||||
syntaxtype *defsyntax = NULL;
|
||||
colortype *tmpcolor, *defcolor = NULL;
|
||||
exttype *e;
|
||||
regexlisttype *e;
|
||||
|
||||
/* libmagic structures */
|
||||
/* magicstring will be NULL if we fail to get magic result */
|
||||
/* Var magicstring will stay NULL if we fail to get a magic result. */
|
||||
#ifdef HAVE_LIBMAGIC
|
||||
const char *magicstring = NULL;
|
||||
const char *magicerr = NULL;
|
||||
magic_t m;
|
||||
#endif /* HAVE_LIBMAGIC */
|
||||
|
||||
magic_t cookie = NULL;
|
||||
struct stat fileinfo;
|
||||
#endif
|
||||
|
||||
assert(openfile != NULL);
|
||||
|
||||
@@ -158,32 +186,9 @@ void color_update(void)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBMAGIC
|
||||
|
||||
if (strcmp(openfile->filename,"")) {
|
||||
m = magic_open(MAGIC_SYMLINK |
|
||||
#ifdef DEBUG
|
||||
MAGIC_DEBUG | MAGIC_CHECK |
|
||||
#endif /* DEBUG */
|
||||
MAGIC_ERROR);
|
||||
if (m == NULL || magic_load(m, NULL) < 0)
|
||||
fprintf(stderr, "something went wrong: %s [%s]\n", strerror(errno), openfile->filename);
|
||||
else {
|
||||
magicstring = magic_file(m,openfile->filename);
|
||||
if (magicstring == NULL) {
|
||||
magicerr = magic_error(m);
|
||||
fprintf(stderr, "something went wrong: %s [%s]\n", magicerr, openfile->filename);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "magic string returned: %s\n", magicstring);
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_LIBMAGIC */
|
||||
|
||||
/* If we didn't specify a syntax override string, or if we did and
|
||||
* there was no syntax by that name, get the syntax based on the
|
||||
* file extension, and then look in the header. */
|
||||
* file extension, then try the headerline, and then try magic. */
|
||||
if (openfile->colorstrings == NULL) {
|
||||
for (tmpsyntax = syntaxes; tmpsyntax != NULL;
|
||||
tmpsyntax = tmpsyntax->next) {
|
||||
@@ -208,8 +213,7 @@ void color_update(void)
|
||||
regcomp(e->ext, fixbounds(e->ext_regex), REG_EXTENDED);
|
||||
}
|
||||
|
||||
/* Set colorstrings if we matched the extension
|
||||
* regex. */
|
||||
/* Set colorstrings if we match the extension regex. */
|
||||
if (regexec(e->ext, openfile->filename, 0, NULL, 0) == 0) {
|
||||
openfile->syntax = tmpsyntax;
|
||||
openfile->colorstrings = tmpsyntax->color;
|
||||
@@ -223,44 +227,10 @@ void color_update(void)
|
||||
}
|
||||
}
|
||||
|
||||
/* Check magic if we don't yet have an answer */
|
||||
#ifdef HAVE_LIBMAGIC
|
||||
if (openfile->colorstrings == NULL) {
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "No match using extension, trying libmagic...\n");
|
||||
#endif /* DEBUG */
|
||||
|
||||
for (tmpsyntax = syntaxes; tmpsyntax != NULL;
|
||||
tmpsyntax = tmpsyntax->next) {
|
||||
for (e = tmpsyntax->magics; e != NULL; e = e->next) {
|
||||
bool not_compiled = (e->ext == NULL);
|
||||
if (not_compiled) {
|
||||
e->ext = (regex_t *)nmalloc(sizeof(regex_t));
|
||||
regcomp(e->ext, fixbounds(e->ext_regex), REG_EXTENDED);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr,"Matching regex \"%s\" against \"%s\"\n",e->ext_regex, magicstring);
|
||||
#endif /* DEBUG */
|
||||
|
||||
if (magicstring && regexec(e->ext, magicstring, 0, NULL, 0) == 0) {
|
||||
fprintf(stderr,"We matched!\n");
|
||||
openfile->syntax = tmpsyntax;
|
||||
openfile->colorstrings = tmpsyntax->color;
|
||||
break;
|
||||
}
|
||||
|
||||
if (not_compiled)
|
||||
nfreeregex(&e->ext);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_LIBMAGIC */
|
||||
|
||||
/* If we haven't matched anything yet, try the headers */
|
||||
/* Check the headerline if the extension didn't match anything. */
|
||||
if (openfile->colorstrings == NULL) {
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "No match for file extensions, looking at headers...\n");
|
||||
fprintf(stderr, "No result from file extension, trying headerline...\n");
|
||||
#endif
|
||||
for (tmpsyntax = syntaxes; tmpsyntax != NULL;
|
||||
tmpsyntax = tmpsyntax->next) {
|
||||
@@ -268,39 +238,89 @@ void color_update(void)
|
||||
for (e = tmpsyntax->headers; e != NULL; e = e->next) {
|
||||
bool not_compiled = (e->ext == NULL);
|
||||
|
||||
/* e->ext_regex has already been checked for validity
|
||||
* elsewhere. Compile its specified regex if we haven't
|
||||
* already. */
|
||||
if (not_compiled) {
|
||||
e->ext = (regex_t *)nmalloc(sizeof(regex_t));
|
||||
regcomp(e->ext, fixbounds(e->ext_regex), REG_EXTENDED);
|
||||
}
|
||||
|
||||
/* Set colorstrings if we matched the extension
|
||||
* regex. */
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "Comparing header regex \"%s\" to fileage \"%s\"...\n", e->ext_regex, openfile->fileage->data);
|
||||
fprintf(stderr, "Comparing header regex \"%s\" to fileage \"%s\"...\n",
|
||||
e->ext_regex, openfile->fileage->data);
|
||||
#endif
|
||||
/* Set colorstrings if we match the header-line regex. */
|
||||
if (regexec(e->ext, openfile->fileage->data, 0, NULL, 0) == 0) {
|
||||
openfile->syntax = tmpsyntax;
|
||||
openfile->colorstrings = tmpsyntax->color;
|
||||
break;
|
||||
}
|
||||
|
||||
if (openfile->colorstrings != NULL)
|
||||
break;
|
||||
|
||||
/* Decompile e->ext_regex's specified regex if we aren't
|
||||
* going to use it. */
|
||||
if (not_compiled)
|
||||
nfreeregex(&e->ext);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBMAGIC
|
||||
/* Check magic if we don't have an answer yet. */
|
||||
if (openfile->colorstrings == NULL) {
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "No result from headerline either, trying libmagic...\n");
|
||||
#endif
|
||||
if (stat(openfile->filename, &fileinfo) == 0) {
|
||||
/* Open the magic database and get a diagnosis of the file. */
|
||||
cookie = magic_open(MAGIC_SYMLINK |
|
||||
#ifdef DEBUG
|
||||
MAGIC_DEBUG | MAGIC_CHECK |
|
||||
#endif
|
||||
MAGIC_ERROR);
|
||||
if (cookie == NULL || magic_load(cookie, NULL) < 0)
|
||||
statusbar(_("magic_load() failed: %s"), strerror(errno));
|
||||
else {
|
||||
magicstring = magic_file(cookie, openfile->filename);
|
||||
if (magicstring == NULL) {
|
||||
statusbar(_("magic_file(%s) failed: %s"),
|
||||
openfile->filename, magic_error(cookie));
|
||||
}
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "Returned magic string is: %s\n", magicstring);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/* Now try and find a syntax that matches the magicstring. */
|
||||
for (tmpsyntax = syntaxes; tmpsyntax != NULL;
|
||||
tmpsyntax = tmpsyntax->next) {
|
||||
|
||||
for (e = tmpsyntax->magics; e != NULL; e = e->next) {
|
||||
bool not_compiled = (e->ext == NULL);
|
||||
|
||||
if (not_compiled) {
|
||||
e->ext = (regex_t *)nmalloc(sizeof(regex_t));
|
||||
regcomp(e->ext, fixbounds(e->ext_regex), REG_EXTENDED);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "Matching regex \"%s\" against \"%s\"\n", e->ext_regex, magicstring);
|
||||
#endif
|
||||
/* Set colorstrings if we match the magic-string regex. */
|
||||
if (magicstring && regexec(e->ext, magicstring, 0, NULL, 0) == 0) {
|
||||
openfile->syntax = tmpsyntax;
|
||||
openfile->colorstrings = tmpsyntax->color;
|
||||
break;
|
||||
}
|
||||
|
||||
if (not_compiled)
|
||||
nfreeregex(&e->ext);
|
||||
}
|
||||
if (openfile->syntax != NULL)
|
||||
break;
|
||||
}
|
||||
if (stat(openfile->filename, &fileinfo) == 0)
|
||||
magic_close(cookie);
|
||||
}
|
||||
#endif /* HAVE_LIBMAGIC */
|
||||
}
|
||||
|
||||
|
||||
/* If we didn't get a syntax based on the file extension, and we
|
||||
* have a default syntax, use it. */
|
||||
/* If we didn't find any syntax yet, and we do have a default one,
|
||||
* use it. */
|
||||
if (openfile->colorstrings == NULL && defcolor != NULL) {
|
||||
openfile->syntax = defsyntax;
|
||||
openfile->colorstrings = defcolor;
|
||||
@@ -326,7 +346,7 @@ void color_update(void)
|
||||
}
|
||||
|
||||
/* Reset the multicolor info cache for records for any lines which need
|
||||
to be recalculated */
|
||||
* to be recalculated. */
|
||||
void reset_multis_after(filestruct *fileptr, int mindex)
|
||||
{
|
||||
filestruct *oof;
|
||||
@@ -372,11 +392,10 @@ void reset_multis_before(filestruct *fileptr, int mindex)
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
edit_refresh_needed = TRUE;
|
||||
}
|
||||
|
||||
/* Reset one multiline regex info */
|
||||
/* Reset one multiline regex info. */
|
||||
void reset_multis_for_id(filestruct *fileptr, int num)
|
||||
{
|
||||
reset_multis_before(fileptr, num);
|
||||
@@ -384,9 +403,9 @@ void reset_multis_for_id(filestruct *fileptr, int num)
|
||||
fileptr->multidata[num] = -1;
|
||||
}
|
||||
|
||||
/* Reset multi line strings around a filestruct ptr, trying to be smart about stopping
|
||||
force = reset everything regardless, useful when we don't know how much screen state
|
||||
has changed */
|
||||
/* Reset multi-line strings around a filestruct ptr, trying to be smart
|
||||
* about stopping. Bool force means: reset everything regardless, useful
|
||||
* when we don't know how much screen state has changed. */
|
||||
void reset_multis(filestruct *fileptr, bool force)
|
||||
{
|
||||
int nobegin, noend;
|
||||
@@ -398,7 +417,7 @@ void reset_multis(filestruct *fileptr, bool force)
|
||||
|
||||
for (; tmpcolor != NULL; tmpcolor = tmpcolor->next) {
|
||||
|
||||
/* If it's not a multi-line regex, amscray */
|
||||
/* If it's not a multi-line regex, amscray. */
|
||||
if (tmpcolor->end == NULL)
|
||||
continue;
|
||||
|
||||
@@ -409,10 +428,10 @@ void reset_multis(filestruct *fileptr, bool force)
|
||||
}
|
||||
|
||||
/* Figure out where the first begin and end are to determine if
|
||||
things changed drastically for the precalculated multi values */
|
||||
nobegin = regexec(tmpcolor->start, fileptr->data, 1, &startmatch, 0);
|
||||
noend = regexec(tmpcolor->end, fileptr->data, 1, &endmatch, 0);
|
||||
if (fileptr->multidata[tmpcolor->id] == CWHOLELINE) {
|
||||
* things changed drastically for the precalculated multi values. */
|
||||
nobegin = regexec(tmpcolor->start, fileptr->data, 1, &startmatch, 0);
|
||||
noend = regexec(tmpcolor->end, fileptr->data, 1, &endmatch, 0);
|
||||
if (fileptr->multidata[tmpcolor->id] == CWHOLELINE) {
|
||||
if (nobegin && noend)
|
||||
continue;
|
||||
} else if (fileptr->multidata[tmpcolor->id] == CNONE) {
|
||||
@@ -424,8 +443,9 @@ void reset_multis(filestruct *fileptr, bool force)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* If we got here assume the worst */
|
||||
/* If we got here, assume the worst. */
|
||||
reset_multis_for_id(fileptr, tmpcolor->id);
|
||||
}
|
||||
}
|
||||
#endif /* ENABLE_COLOR */
|
||||
|
||||
#endif /* !DISABLE_COLOR */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user