xref: /nano/
Name Date Size

..27-Apr.-20224 KiB

.gitignoreH A D15-Jun.-2020958

AUTHORSH A D16-Apr.-20202.8 KiB

autogen.shH A D27-Apr.-2022998

ChangeLogH A D28-Apr.-2022308.3 KiB

ChangeLog.1999-2006H A D26-Mar.-2020363 KiB

ChangeLog.2007-2015H A D25-Mar.-2020200.7 KiB

configure.acH A D28-Apr.-202216.4 KiB

COPYINGH A D13-Aug.-201734.2 KiB

COPYING.DOCH A D13-Aug.-201719.9 KiB

doc/H19-Jun.-20224 KiB

IMPROVEMENTSH A D15-Dec.-202111.1 KiB

m4/H26-Mar.-20204 KiB

Makefile.amH A D24-Aug.-2020297

nano-regressH A D13-Aug.-2017828

NEWSH A D28-Apr.-2022122.9 KiB

po/H28-Apr.-20224 KiB

READMEH A D28-Apr.-20225.2 KiB

README.hackingH A D12-Jun.-20223.6 KiB

roll-a-release.shH A D28-Apr.-2022934

src/H14-Jun.-20224 KiB

syntax/H09-Jun.-20224 KiB

THANKSH A D20-Nov.-20216.2 KiB

TODOH A D26-Mar.-202099

README

1
2          GNU nano -- a simple editor, inspired by Pico
3
4Purpose
5
6    Nano is a small and simple text editor for use on the terminal.
7    It copied the interface and key bindings of the Pico editor but
8    added several missing features: undo/redo, syntax highlighting,
9    line numbers, softwrapping, multiple buffers, selecting text by
10    holding Shift, search-and-replace with regular expressions, and
11    several other conveniences.
12
13Appearance
14
15    In rough ASCII graphics, this is what nano's screen looks like:
16
17   ____________________________________________________________________
18  |  GNU nano 6.3                  filename                  Modified  |
19   --------------------------------------------------------------------
20  | This is the text window, displaying the contents of a 'buffer',    |
21  | the contents of the file you are editing.                          |
22  |                                                                    |
23  | The top row of the screen is the 'title bar'; it shows nano's      |
24  | version, the name of the file, and whether you modified it.        |
25  | The two bottom rows display the most important shortcuts; in       |
26  | those lines ^ means Ctrl.  The third row from the bottom shows     |
27  | some feedback message, or gets replaced with a prompt bar when     |
28  | you tell nano to do something that requires extra input.           |
29  |                                                                    |
30   --------------------------------------------------------------------
31  |                       [ Some status message ]                      |
32  |^G Help       ^O Write Out  ^W Where Is   ^K Cut        ^T Execute  |
33  |^X Exit       ^R Read File  ^\ Replace    ^U Paste      ^J Justify  |
34   --------------------------------------------------------------------
35
36Origin
37
38    The nano project was started in 1999 because of a few "problems"
39    with the wonderfully easy-to-use and friendly Pico text editor.
40
41    First and foremost was its license: the Pine suite does not use
42    the GPL, and (before using the Apache License) it had unclear
43    restrictions on redistribution.  Because of this, Pine and Pico
44    were not included in many GNU/Linux distributions.  Furthermore,
45    some features (like go-to-line-number or search-and-replace) were
46    unavailable for a long time or require a command-line flag.  Yuck.
47
48    Nano aimed to solve these problems by: 1) being truly free software
49    by using the GPL, 2) emulating the functionality of Pico as closely
50    as is reasonable, and 3) including extra functionality by default.
51
52    Nowadays, nano wants to be a generally useful editor with sensible
53    defaults (linewise scrolling, no automatic line breaking).
54
55    The nano editor is an official GNU package.  For more information on
56    GNU and the Free Software Foundation, please see https://www.gnu.org/.
57
58License
59
60    Nano's code and documentation are covered by the GPL version 3 or
61    (at your option) any later version, except for two functions that
62    were copied from busybox which are under a BSD license.  Nano's
63    documentation is additionally covered by the GNU Free Documentation
64    License version 1.2 or (at your option) any later version.  See the
65    files COPYING and COPYING.DOC for the full text of these licenses.
66
67    When in any file of this package a copyright notice mentions a
68    year range (such as 1999-2011), it is a shorthand for a list of
69    all the years in that interval.
70
71How to compile and install nano
72
73    Download the latest nano source tarball, and then:
74
75        tar -xvf nano-x.y.tar.gz
76        cd nano-x.y
77        ./configure
78        make
79        make install
80
81    You will need the header files of ncurses installed for ./configure
82    to succeed -- get them from libncurses-dev (Debian) or ncurses-devel
83    (Fedora) or a similarly named package.  Use --prefix with ./configure
84    to override the default installation directory of /usr/local.
85
86    After installation you may want to copy the doc/sample.nanorc file
87    to your home directory, rename it to ".nanorc", and then edit it
88    according to your taste.
89
90Web Page
91
92    https://nano-editor.org/
93
94Mailing Lists
95
96    There are three nano-related mailing-lists.
97
98    * <info-nano@gnu.org> is a very low traffic list used to announce
99      new nano versions or other important info about the project.
100
101    * <help-nano@gnu.org> is for those seeking to get help without
102      wanting to hear about the technical details of its development.
103
104    * <nano-devel@gnu.org> is the list used by the people that make nano
105      and a general development discussion list, with moderate traffic.
106
107    To subscribe, send email to <name>-request@gnu.org with a subject
108    of "subscribe", where <name> is the list you want to subscribe to.
109
110    The archives of the development and help mailing lists are here:
111
112        https://lists.gnu.org/archive/html/nano-devel/
113        https://lists.gnu.org/archive/html/help-nano/
114
115Bug Reports
116
117    If you find a bug, please file a detailed description of the problem
118    on nano's issue tracker: https://savannah.gnu.org/bugs/?group=nano
119    (you will need an account to be able to do so), or send an email
120    to the nano-devel list (no need to subscribe, but mention it if
121    you want to be CC'ed on an answer).
122
123

README.hacking

1INSTRUCTIONS FOR COMPILING AND INSTALLING NANO FROM GIT
2=======================================================
3
4The latest changes and fixes for GNU nano are available via git, but
5building this needs a bit more care than the official tarballs.
6
7
8Prerequisites
9-------------
10
11To successfully compile GNU nano from git, you'll need the following:
12
13    autoconf    (version >= 2.69)
14    automake    (version >= 1.14)
15    autopoint   (version >= 0.18.3)
16    gcc         (version >= 5.0)
17    gettext     (version >= 0.18.3)
18    git         (version >= 2.7.4)
19    groff       (version >= 1.12)
20    make        (any version)
21    pkg-config  (version >= 0.22)
22    texinfo     (version >= 4.0)
23
24You will also need to have the header files for ncurses installed,
25from libncurses-dev on Debian, ncurses-devel on Fedora, or similar.
26
27These should all be available in your distro's package manager or
28software center, or otherwise on any GNU mirror.
29
30
31Clone the source
32----------------
33
34To obtain the current nano development branch (called 'master'), use the
35following command.  It will create in your current working directory a
36subdirectory called 'nano' containing a copy of all of the files:
37
38    $ git clone git://git.savannah.gnu.org/nano.git
39
40
41Generate the configure script
42-----------------------------
43
44Once you have the sources in the "nano" directory,
45
46    $ cd nano
47    $ ./autogen.sh
48
49This will set up a configure script and a Makefile.in file.
50
51
52Configure your build
53--------------------
54
55To configure your build, run the configure script from the nano source
56directory:
57
58    $ ./configure [--add-options-here]
59
60
61Build and install
62-----------------
63
64From the nano source directory, build the code with:
65
66    $ make
67
68Then, once it's done compiling, run:
69
70    $ make install
71
72which should copy various files (i.e. the nano executable, the info and
73man pages, and syntax highlighting pattern files) to their appropriate
74directories.
75
76If you're installing into the default install directory (/usr/local),
77you'll need to run that "make install" command with root privileges.
78
79
80Problems?
81---------
82
83Please submit any bugs you find in the code in git via the bug tracker
84on Savannah (https://savannah.gnu.org/bugs/?group=nano).
85
86
87Contributing something
88----------------------
89
90If you have a fix for a bug, or the code for a new or improved feature,
91first create a branch off of master:
92
93    $ git checkout -b somename
94
95Then change the code so it does what you want, and commit it together
96with your Sign-off:
97
98    $ git commit -as
99
100In the commit message (after the one-line summary) give a rationale
101for the change.  With your Signed-off-by you declare that the code is
102yours, or that you are free to reuse it, and that you submit it under
103the license that covers nano.  Then create a patch (or patches):
104
105    $ git format-patch master
106
107Send that patch (or patches) to <nano-devel@gnu.org>, as an attachment
108or with git send-email.
109
110To keep most lines of nano's source code within a width of 80 characters,
111a tab size of four should be used.  So in your nanorc file you may want
112to include 'set tabsize 4', or you could use -T4 on the command line.
113To make git display things as intended, you can do:
114
115    $ git config --local core.pager "less -x1,5"
116
117To see all types that are used in nano's source code colorized as types,
118you can add these lines to your ~/.nanorc:
119
120    extendsyntax c color green "\<struct (dirent|option|passwd)\>"
121    extendsyntax c color green "\<struct (sigaction|stat|termios)\>"
122    extendsyntax c color green "\<struct (timespec|vt_stat|winsize)\>"
123    extendsyntax c color green "\<([[:lower:]_]+(struct|type)|va_list)\>"
124