Nano (Simple Text Editor)
GNU Nano is a simple text editor for text terminals - easy to use (until you master VI or Emacs).
Older versions of nano are readily availble in most unix environments.
- Ubuntu/Debian:
sudo apt-get -y install nano
- RedHat/CentOS/Fedora:
sudo yum install nano
- Mac OS X:
nano
is installed by default.
Nano Usage Tips
CTRL-T
- Spell checkCTRL-J
- re-justify text (when usingmdnano
, justifies to 78 characters)CTRL-K
- Cut lines (e.g. kill)CTRL-U
- Paste lines (e.g. UnCut)ALT-U
- Undo (in newer versions)
Further information: Text Editing Made Easy.
Nano installation Instructions
Follow the instructions below to install a recent version of nano with syntax-highlighting, and special settings for easy MarkDown editing.
Installation
Download nano:
wget http://www.nano-editor.org/dist/v2.4/nano-2.4.2.tar.gz
# Use curl if wget not available
# curl http://www.nano-editor.org/dist/v2.4/nano-2.4.2.tar.gz > nano-2.4.2.tar.gz
Build & Install nano
tar -xzf nano-2.4.2.tar.gz
cd nano-2.4.2
./configure
make
sudo make install
Download and install markdown syntax highlighting:
wget http://crashcourse.housegordon.org/files/markdown.nanorc
# Use curl if wget not availalbe:
# curl http://crashcourse.housegordon.org/files/markdown.nanorc > markdown.nanorc
sudo cp markdown.nanorc /usr/local/share/nano/
Download and install nanorc file:
wget http://housegordon.org/files/nanorc
# Use curl if wget not availalbe:
# curl http://crashcourse.housegordon.org/files/nanorc > nanorc
sudo cp nanorc /usr/local/etc/
Create alias for Markdown editing with nano (optional):
echo "alias mdnano='nano -E -T 4 -Y markdown -r 78'" >> ~/.bash_aliases
. ~/.bash_aliases
Install spell-checker (optional)
sudo apt-get -y install spell aspell
NOTES
-
Above instructions assume defaults settings:
configuration files in/usr/local/etc
binary files in/usr/local/bin
data files in/usr/local/share/nano
These could be changed with custom parameters to./configure
. -
Above instructions assume the common ‘bash’ shell.
-
Spell-check installation assume Debian/Ubuntu system.