From f1b87f960c456fb5188ae9ae260bfffe552847d5 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sat, 24 Dec 2016 17:49:14 +0100 Subject: [PATCH] build: rename the sample config file, so it will be colored like a nanorc --- AUTHORS | 2 +- README | 2 +- configure.ac | 2 +- doc/.gitignore | 2 +- doc/faq.html | 4 ++-- doc/{nanorc.sample.in => sample.nanorc.in} | 0 nano.spec.in | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) rename doc/{nanorc.sample.in => sample.nanorc.in} (100%) diff --git a/AUTHORS b/AUTHORS index 1fe47909..789524d4 100644 --- a/AUTHORS +++ b/AUTHORS @@ -39,7 +39,7 @@ Mike Frysinger * Gentoo package maintainer. Whitespace display mode, --enable-utf8/--disable-utf8 configure options for ncurses, many new color regexes and improvements to existing color - regexes for nanorc.sample, and miscellaneous bug fixes. + regexes in syntax/*.nanorc, and miscellaneous bug fixes. Mark Majeres * A functional undo/redo system, and coloring nano's interface. diff --git a/README b/README index 928de1a6..fc0ea4bf 100644 --- a/README +++ b/README @@ -34,7 +34,7 @@ How to compile and install nano default installation directory of /usr/local. If you haven't configured with the --disable-nanorc option, after - installation you may want to copy the doc/nanorc.sample file to + installation you may want to copy the doc/sample.nanorc file to your home directory, rename it to ".nanorc", and then edit it according to your taste. diff --git a/configure.ac b/configure.ac index 04b3b507..e0017559 100644 --- a/configure.ac +++ b/configure.ac @@ -751,7 +751,7 @@ AM_CONDITIONAL(BUILDING_FROM_GIT, test x$from_git = xyes) AC_CONFIG_FILES([ Makefile doc/Makefile -doc/nanorc.sample +doc/sample.nanorc m4/Makefile po/Makefile.in src/Makefile diff --git a/doc/.gitignore b/doc/.gitignore index da6439a8..ff72249c 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -1,7 +1,7 @@ -/nanorc.sample nano.1.html rnano.1.html nanorc.5.html texinfo.tex nano.info nano.html +sample.nanorc diff --git a/doc/faq.html b/doc/faq.html index 3b598fb4..0fa4b71f 100644 --- a/doc/faq.html +++ b/doc/faq.html @@ -159,8 +159,8 @@

3.8. Tell me more about this verbatim input stuff!

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 Meta-V (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.

Alternatively, if you've enabled Unicode support (see section 5.3), you can press Meta-V 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.

-

3.9a. How do I make a .nanorc file that nano will read when I start it?

-

It's not hard at all! But, your version of nano must not have been compiled with --disable-nanorc, and must be version 1.1.12 or newer (use nano -V to check your version and compiled features). Then simply copy the nanorc.sample 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 words set and unset plus the long option name for the feature. For example, "set nowrap" or "set smarthome".

+

3.9a. How do I make a .nanorc file that will be read when I start nano?

+

It's not hard at all! But, your nano must not have been compiled with --disable-nanorc. Then simply copy the sample.nanorc 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 of the file is simple. Flags are turned on and off by using the words set and unset plus the long option name for the feature. For example, "set nowrap" or "set smarthome".

3.9b. How about in Win32?

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).

We're still working on documentation for enabling syntax highlighting on Win32; please bear with us.

diff --git a/doc/nanorc.sample.in b/doc/sample.nanorc.in similarity index 100% rename from doc/nanorc.sample.in rename to doc/sample.nanorc.in diff --git a/nano.spec.in b/nano.spec.in index ccb20a5e..05a7891b 100644 --- a/nano.spec.in +++ b/nano.spec.in @@ -43,7 +43,7 @@ fi %files %defattr(-,root,root) -%doc AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS TODO doc/faq.html doc/nanorc.sample +%doc AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS TODO doc/faq.html doc/sample.nanorc %{_bindir}/* %{_docdir}/nano/* %{_mandir}/man*/*