from small one page howto to huge articles all in one place

search text in:




Other .linuxhowtos.org sites: www.linuxhowtos.org
toolsntoys.linuxhowtos.org



Last additions:
How to make X listen on port 6000

How to make X listen on port 6000

words:

34

views:

85407

userrating:

average rating: 1.2 (52 votes) (1=very good 6=terrible)


May, 25th 2007:
April, 26th 2007:
Apr, 10th. 2007:
Druckversion . pdf icon
You are here: Tutorials per portage category->app-editors->nano

Configuring the nano text editor


nano 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, nano also implements some missing (or disabled by default) features in Pico, such as "search and replace" and "goto line number".

Lets go ahead and configure it.

($:~)=> nano -w ~/.nanorc
# Use auto-indentation  
set autoindent

# Backup files to filename~
set backup

# Use cut to end of line with ^K by default
set cut

# Enable ~/.nano_history for saving and reading search/replace strings.
# set historylog

# Don't convert files from DOS/Mac format
set noconvert

# Don't follow symlinks when writing files
# set nofollow

# Don't display the help lists at the bottom of the screen
# set nohelp

# Don't wrap text at all
set nowrap

# Use smooth scrolling as the default
set smooth

# Use this spelling checker instead of the internal one. This option
# does not properly have a default value.
set speller "aspell -c"

# Allow nano to be suspended with ^Z
# set suspend

# Use this tab size instead of the default; it must be greater than 0
# set tabsize 8

# Save automatically on exit, don't prompt
# set tempfile

# Enable ~/.nano_history for saving and reading search/replace strings.
# set historylog

# Disallow file modification, why would you want this in an rc file? ;)
# set view

#Color Syntax Highlighting
syntax "c-file" "\.(c|h)$"
color red "\<[A-Z_]{2,}\>"
color green "\<(float|char|int|void|static|const|struct)\>"
color brightyellow "\<(if|while|do|else|case|switch)\>"
color brightcyan "^#( )*(define|include|ifn?def|endif|elif|else|if)"
color brightyellow "<[^= ]*>" ""(.|[^"])*""
color brightyellow start=""(\\.|[^\"])*\\( | )*$" end="^(\\.|[^\"])*""
color brightblue "//.*"
color brightblue start="/\*" end="\*/"

syntax "HTML" "\.html$"
color blue start="<" end=">"
color red "&[^; ]*;"

syntax "TeX" "\.tex$"
color green "\\.|\\[A-Za-z]*"
color magenta "[{}]"
color blue "%.*"

syntax "mutt"
color green "^>.*"

syntax "php" ".*/*.php$"
color brightwhite "\{|\}|\."
color red "('[^']*')"
color red "\"[^\"]*\""
color brightblue "(\$([[:alpha:]_]|->)*)"
color brightgreen "((\$(([[:alpha:]_0-9])+\->)+)[[:alpha:]_0-9]+\()"
color yellow " (if|else if|else|return|case|break)"
color yellow "\|\||\?|!|\||&&|=|;|\(|\)"
color red "false|true"
color brightwhite "[[:space:]]+debug|[[:space:]]+echo|\$this\->debug"
color cyan "//.*"
color cyan start="/\*" end="\*/"

syntax "groff" "\.ms$" "\.mm$" "\.me$" "\.tmac$" "^tmac." ".rof"
color cyan "^\.ds [^ ]*"
color cyan "^\.nr [^ ]*"
color brightmagenta "\\."
color brightmagenta "\\f."
color brightmagenta "\\f\(.."
color brightmagenta "\\s(\+|\-)?[0-9]"
color cyan "(\\|\\\\)n."
color cyan "(\\|\\\\)n\(.."
color cyan start="(\\|\\\\)n\[" end="]"
color brightgreen "^\. *[^ ]*"
color yellow "^\.\\\".*$"
color green "(\\|\\\\)\*."
color green "(\\|\\\\)\*\(.."
color green start="(\\|\\\\)\*\[" end="]"
color brightred "\\\(.."
color brightred start="\\\[" end="]"
color brightcyan "\\\\\$[1-9]"

syntax "perl" "\.p[lm]$"
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|seekdir|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|st
udy|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)\>"
color cyan start="[$@%]" end="( |\\W|-)"
color yellow "".*"|qq\|.*\|"
color white "[sm]/.*/"
color white start="(^use| = new)" end=";"
color green "#.*"
color yellow start="<< 'STOP'" end="STOP"

syntax "Java source" "\.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)\>"
color red ""[^"]*""
color yellow "<(true|false|null)>"
color blue "//.*"
color blue start="/\*" end="\*/"
color brightblue start="/\*\*" end="\*/"
color brightgreen,brightgreen "[ ]+$"

syntax "nanorc" "[\.]*nanorc$"
color white "^ *(set|unset).*$"
color cyan "^ *(set|unset) (autoindent|backup|const|cut|fill|keypad|multibuffer|noconvert|nofollow|nohelp|nowrap|operatingdir|preserve|quotestr|regexp|smooth|speller|suspend|tabsize|tempfile|historylog|view)"
color brightwhite "^ *syntax [^ ]*"
color brightblue "^ *set\>" "^ *unset\>" "^ *syntax\>"
color white "^ *color\>.*"
color yellow "^ *color (bright)?(white|black|red|blue|green|yellow|magenta|cyan)\>"
color magenta "^ *color\>"
color green "^#.*$"

syntax "bash" "\.sh$"
color brightblack "#.*"
color brightyellow "\(" "\)" "\{" "\}"
color red "\<[A-Z_]{2,}\>"
color red "[\$\*\'\`\|\=]"
color brightblue "\[.*\]"
color green "\<-e\>" "\<-d\>" "\<-f\>" "\<-r\>" "\<-g\>" "\<-u\>" "\<-u\>" "\<-w\>" "\<-x\>" "\<-L\>"
color green "\<-eq\>" "\<-ne\>" "\<-gt\>" "\<-lt\>" "\<-ge\>" "\<-le\>" "\<-s\>" "\<-n\>" "\<-z\>"
color blue "\" "\" "\" "\" "\" "\" "\" "\" "\"
color blue "\" "\" "\" "\" "\"
color brightwhite "\.*"


And thats it. You may want to read the /usr/share/doc/nano/nanorc.sample file for any other options you may want or change the color highlighting a bit.
rate this article:
current rating: average rating: 1.4 (58 votes) (1=very good 6=terrible)
Your rating:
Very good (1) Good (2) ok (3) average (4) bad (5) terrible (6)

back



Support us on Content Nation

New Packages

- as rdf newsfeed
- as rss newsfeed
- as Atom newsfeed
2026-05-29
ruff - 0.15.15
Ebuild name:

dev-util/ruff-0.15.15

Description

An extremely fast Python linter, written in Rust

Added to portage

2026-05-29

shim - 16.1_p8
Ebuild name:

sys-boot/shim-16.1_p8

Description

Fedora's signed UEFI shim

Added to portage

2026-05-29

2026-05-28
abseil-cpp - 20260107.1
Ebuild name:

dev-cpp/abseil-cpp-20260107.1

Description

Abseil Common Libraries (C++), LTS Branch

Added to portage

2026-05-28

awscli - 1.45.16
Ebuild name:

app-admin/awscli-1.45.16

Description

Universal Command Line Environment for AWS

Added to portage

2026-05-28

boto3 - 1.43.16
Ebuild name:

dev-python/boto3-1.43.16

Description

The AWS SDK for Python

Added to portage

2026-05-28

botocore - 1.43.16
Ebuild name:

dev-python/botocore-1.43.16

Description

Low-level, data-driven core of boto 3

Added to portage

2026-05-28

breeze-icons - 6.25.0-r1
Ebuild name:

kde-frameworks/breeze-icons-6.25.0-r1

Description

Breeze SVG icon theme

Added to portage

2026-05-28

breeze-icons - 6.26.0-r1
Ebuild name:

kde-frameworks/breeze-icons-6.26.0-r1

Description

Breeze SVG icon theme

Added to portage

2026-05-28

cfn-lint - 1.51.2
Ebuild name:

dev-python/cfn-lint-1.51.2

Description

CloudFormation Linter

Added to portage

2026-05-28

chrome-binary-plugins - 148.0.7778.215
Ebuild name:

www-plugins/chrome-binary-plugins-148.0.7778.215

Description

Binary plugins from Google Chrome for use in Chrom

Added to portage

2026-05-28

chromedriver-bin - 148.0.7778.215
Ebuild name:

www-apps/chromedriver-bin-148.0.7778.215

Description

WebDriver for Chrome

Added to portage

2026-05-28

chromium - 148.0.7778.215
Ebuild name:

www-client/chromium-148.0.7778.215

Description

Open-source version of Google Chrome web browser

Added to portage

2026-05-28

claude-code - 2.1.152
Ebuild name:

dev-util/claude-code-2.1.152

Description

Claude Code - an agentic coding tool by Anthropic

Added to portage

2026-05-28

dbus-fast - 5.0.16
Ebuild name:

dev-python/dbus-fast-5.0.16

Description

A faster version of dbus-next

Added to portage

2026-05-28

deno-bin - 2.8.1
Ebuild name:

dev-lang/deno-bin-2.8.1

Description

Modern runtime for JavaScript and TypeScript

Added to portage

2026-05-28

docutils - 0.23
Ebuild name:

dev-python/docutils-0.23

Description

Python Documentation Utilities (reference reStructuredText impl.)

Added to portage

2026-05-28

gamescope - 3.16.24
Ebuild name:

gui-wm/gamescope-3.16.24

Description

Efficient micro-compositor for running games

Added to portage

2026-05-28

gentoo-functions - 1.7.7
Ebuild name:

sys-apps/gentoo-functions-1.7.7

Description

Base functions required by all Gentoo systems

Added to portage

2026-05-28

ginkgo - 1.11.0
Ebuild name:

sci-libs/ginkgo-1.11.0

Description

Numerical linear algebra software package

Added to portage

2026-05-28

git-delete-merged-branches - 7.6.0
Ebuild name:

dev-vcs/git-delete-merged-branches-7.6.0

Description

Command-line tool to delete merged Git branches

Added to portage

2026-05-28

google-chrome - 148.0.7778.215
Ebuild name:

www-client/google-chrome-148.0.7778.215

Description

The web browser from Google

Added to portage

2026-05-28

google-protobuf - 3.25.9
Ebuild name:

dev-ruby/google-protobuf-3.25.9

Description

Protocol Buffers are Google's data interchange format

Added to portage

2026-05-28

google-protobuf - 4.33.4
Ebuild name:

dev-ruby/google-protobuf-4.33.4

Description

Protocol Buffers are Google's data interchange format

Added to portage

2026-05-28

google-protobuf - 4.34.2
Ebuild name:

dev-ruby/google-protobuf-4.34.2

Description

Protocol Buffers are Google's data interchange format

Added to portage

2026-05-28

googleapis-common-protos-types - 1.23.0
Ebuild name:

dev-ruby/googleapis-common-protos-types-1.23.0

Description

Common protocol buffer types used by Google APIs

Added to portage

2026-05-28

grpc - 1.80.0
Ebuild name:

dev-ruby/grpc-1.80.0

Description

Send RPCs from Ruby using GRPC

Added to portage

2026-05-28

grpc - 1.80.0
Ebuild name:

net-libs/grpc-1.80.0

Description

Modern open source high performance RPC framework

Added to portage

2026-05-28

hypothesis - 6.153.6
Ebuild name:

dev-python/hypothesis-6.153.6

Description

A library for property based testing

Added to portage

2026-05-28

kitty - 0.47.1
Ebuild name:

x11-terms/kitty-0.47.1

Description

Fast, feature-rich, GPU-based terminal

Added to portage

2026-05-28

kitty-shell-integration - 0.47.1
Ebuild name:

x11-terms/kitty-shell-integration-0.47.1

Description

Shell integration scripts for kitty, a GPU-based terminal

Added to portage

2026-05-28

kitty-terminfo - 0.47.1
Ebuild name:

x11-terms/kitty-terminfo-0.47.1

Description

Terminfo for kitty, a GPU-based terminal emulator

Added to portage

2026-05-28

kokkos - 4.7.4
Ebuild name:

dev-cpp/kokkos-4.7.4

Description

C++ Performance Portability Programming EcoSystem

Added to portage

2026-05-28

kokkos - 5.1.1
Ebuild name:

dev-cpp/kokkos-5.1.1

Description

C++ Performance Portability Programming EcoSystem

Added to portage

2026-05-28

librsvg - 2.62.2-r1
Ebuild name:

gnome-base/librsvg-2.62.2-r1

Description

Scalable Vector Graphics (SVG) rendering library

Added to portage

2026-05-28

libzia - 4.72
Ebuild name:

dev-libs/libzia-4.72

Description

Platform abstraction code for tucnak package

Added to portage

2026-05-28

mesa - 26.0.7
Ebuild name:

media-libs/mesa-26.0.7

Description

OpenGL-like graphic library for Linux

Added to portage

2026-05-28

mesa - 26.0.8
Ebuild name:

media-libs/mesa-26.0.8

Description

OpenGL-like graphic library for Linux

Added to portage

2026-05-28

mesa_clc - 26.0.7
Ebuild name:

dev-util/mesa_clc-26.0.7

Description

mesa_clc tool used for building OpenCL C to SPIR-V

Added to portage

2026-05-28

mesa_clc - 26.0.8
Ebuild name:

dev-util/mesa_clc-26.0.8

Description

mesa_clc tool used for building OpenCL C to SPIR-V

Added to portage

2026-05-28

microsoft-edge-beta - 149.0.4022.33
Ebuild name:

www-client/microsoft-edge-beta-149.0.4022.33

Description

The web browser from Microsoft

Added to portage

2026-05-28

microsoft-edge-dev - 150.0.4055.0
Ebuild name:

www-client/microsoft-edge-dev-150.0.4055.0

Description

The web browser from Microsoft

Added to portage

2026-05-28

mod_h2 - 2.0.41
Ebuild name:

www-apache/mod_h2-2.0.41

Description

HTTP/2 module for Apache

Added to portage

2026-05-28

mosh - 1.4.0-r2
Ebuild name:

net-misc/mosh-1.4.0-r2

Description

Mobile shell that supports roaming and intelligent local echo

Added to portage

2026-05-28

multi-term - 1.4-r1
Ebuild name:

app-emacs/multi-term-1.4-r1

Description

Manage multiple terminal buffers in Emacs

Added to portage

2026-05-28

multiple-cursors - 1.5.0
Ebuild name:

app-emacs/multiple-cursors-1.5.0

Description

Multiple cursors for Emacs

Added to portage

2026-05-28

nvidia-drivers - 595.80
Ebuild name:

x11-drivers/nvidia-drivers-595.80

Description

NVIDIA Accelerated Graphics Driver

Added to portage

2026-05-28

opencv - 4.12.0-r2
Ebuild name:

media-libs/opencv-4.12.0-r2

Description

A collection of algorithms and sample code for various computer vision

Added to portage

2026-05-28

opera-developer - 133.0.5910.0
Ebuild name:

www-client/opera-developer-133.0.5910.0

Description

A fast and secure web browser

Added to portage

2026-05-28

papers - 50.2
Ebuild name:

app-text/papers-50.2

Description

A document viewer for the GNOME desktop

Added to portage

2026-05-28

protobuf - 25.9
Ebuild name:

dev-libs/protobuf-25.9

Description

Google's Protocol Buffers - Extensible mechanism for serializing structured

Added to portage

2026-05-28

protobuf - 29.5-r1
Ebuild name:

dev-libs/protobuf-29.5-r1

Description

Google's Protocol Buffers - Extensible mechanism for serializing structur

Added to portage

2026-05-28

protobuf - 33.4
Ebuild name:

dev-libs/protobuf-33.4

Description

Google's Protocol Buffers - Extensible mechanism for serializing structured

Added to portage

2026-05-28

protobuf - 34.2
Ebuild name:

dev-libs/protobuf-34.2

Description

Google's Protocol Buffers - Extensible mechanism for serializing structured

Added to portage

2026-05-28

pyside - 6.11.1-r1
Ebuild name:

dev-python/pyside-6.11.1-r1

Description

Python bindings for the Qt framework

Added to portage

2026-05-28

python-discovery - 1.3.2
Ebuild name:

dev-python/python-discovery-1.3.2

Description

Python interpreter discovery

Added to portage

2026-05-28

pyzotero - 1.13.0
Ebuild name:

dev-python/pyzotero-1.13.0

Description

A Python client for the Zotero API

Added to portage

2026-05-28

rivet - 4.1.3
Ebuild name:

sci-physics/rivet-4.1.3

Description

Robust Independent Validation of Experiment and Theory toolkit

Added to portage

2026-05-28

securesystemslib - 1.4.0
Ebuild name:

dev-python/securesystemslib-1.4.0

Description

Cryptographic routines for Secure Systems Lab projects at NYU

Added to portage

2026-05-28

spotify - 1.2.90
Ebuild name:

media-sound/spotify-1.2.90

Description

Spotify is a social music platform

Added to portage

2026-05-28

stripe - 15.2.0
Ebuild name:

dev-python/stripe-15.2.0

Description

Stripe Python bindings

Added to portage

2026-05-28

sway - 1.12
Ebuild name:

gui-wm/sway-1.12

Description

i3-compatible Wayland window manager

Added to portage

2026-05-28

taskflow - 4.0.0
Ebuild name:

dev-cpp/taskflow-4.0.0

Description

Modern C++ Parallel Task Programming

Added to portage

2026-05-28

teamspeak-server - 3.13.8
Ebuild name:

media-sound/teamspeak-server-3.13.8

Description

A server software for hosting quality voice communication via t

Added to portage

2026-05-28

threadweaver - 6.25.0-r1
Ebuild name:

kde-frameworks/threadweaver-6.25.0-r1

Description

Framework for managing threads using job and queue-based inte

Added to portage

2026-05-28

threadweaver - 6.26.0-r1
Ebuild name:

kde-frameworks/threadweaver-6.26.0-r1

Description

Framework for managing threads using job and queue-based inte

Added to portage

2026-05-28

tokenizers - 0.23.1
Ebuild name:

sci-ml/tokenizers-0.23.1

Description

Implementation of today's most used tokenizers

Added to portage

2026-05-28

tornado - 6.5.6
Ebuild name:

dev-python/tornado-6.5.6

Description

Python web framework and asynchronous networking library

Added to portage

2026-05-28

trilinos - 16.2.1
Ebuild name:

sci-libs/trilinos-16.2.1

Description

Scientific library collection for large scale problems

Added to portage

2026-05-28

trilinos - 17.1.0
Ebuild name:

sci-libs/trilinos-17.1.0

Description

Scientific library collection for large scale problems

Added to portage

2026-05-28

tucnak - 4.72
Ebuild name:

media-radio/tucnak-4.72

Description

Amateur Radio VHF Contest Logbook

Added to portage

2026-05-28

typer - 0.26.2
Ebuild name:

dev-python/typer-0.26.2

Description

Build great CLIs. Easy to code. Based on Python type hints

Added to portage

2026-05-28

vivaldi - 8.0.4033.34
Ebuild name:

www-client/vivaldi-8.0.4033.34

Description

A browser for our friends

Added to portage

2026-05-28

vivaldi-snapshot - 8.0.4033.19
Ebuild name:

www-client/vivaldi-snapshot-8.0.4033.19

Description

A browser for our friends

Added to portage

2026-05-28

vivaldi-snapshot - 8.0.4033.24
Ebuild name:

www-client/vivaldi-snapshot-8.0.4033.24

Description

A browser for our friends

Added to portage

2026-05-28

webrtc-audio-processing - 1.3-r4
Ebuild name:

media-libs/webrtc-audio-processing-1.3-r4

Description

AudioProcessing library from the webrtc.org codebase

Added to portage

2026-05-28

yoda - 2.1.3
Ebuild name:

sci-physics/yoda-2.1.3

Description

Yet more Objects for (High Energy Physics) Data Analysis

Added to portage

2026-05-28

rdf newsfeed | rss newsfeed | Atom newsfeed
Copyright 2004-2025 Sascha Nitsch Unternehmensberatung GmbH
- Copyright and legal notices -
Time to create this page: 39.6 ms