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:

88486

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-09-19
clang-runtime - 19.1.7-r2
Ebuild name:

llvm-runtimes/clang-runtime-19.1.7-r2

Description

Meta-ebuild for clang runtime libraries

Added to portage

2026-09-19

clang-runtime - 20.1.8-r2
Ebuild name:

llvm-runtimes/clang-runtime-20.1.8-r2

Description

Meta-ebuild for clang runtime libraries

Added to portage

2026-09-19

clang-runtime - 21.1.8-r1
Ebuild name:

llvm-runtimes/clang-runtime-21.1.8-r1

Description

Meta-ebuild for clang runtime libraries

Added to portage

2026-09-19

clang-runtime - 22-r1
Ebuild name:

llvm-runtimes/clang-runtime-22-r1

Description

Meta-ebuild for clang runtime libraries

Added to portage

2026-09-19

clang-runtime - 23-r2
Ebuild name:

llvm-runtimes/clang-runtime-23-r2

Description

Meta-ebuild for clang runtime libraries

Added to portage

2026-09-19

parse - 1.22.2
Ebuild name:

dev-python/parse-1.22.2

Description

Parse strings using a specification based on the Python format() syntax

Added to portage

2026-09-19

2026-09-18
Coro - 6.570.0-r1
Ebuild name:

dev-perl/Coro-6.570.0-r1

Description

The only real threads in perl

Added to portage

2026-09-18

awkward - 2.14.0
Ebuild name:

dev-python/awkward-2.14.0

Description

Manipulate JSON-like data with NumPy-like idioms

Added to portage

2026-09-18

awkward-cpp - 57
Ebuild name:

dev-python/awkward-cpp-57

Description

CPU kernels and compiled extensions for Awkward Array

Added to portage

2026-09-18

awscli - 2.36.48
Ebuild name:

app-admin/awscli-2.36.48

Description

Universal Command Line Environment for AWS

Added to portage

2026-09-18

barman - 3.20.0
Ebuild name:

dev-db/barman-3.20.0

Description

Administration tool for disaster recovery of PostgreSQL servers

Added to portage

2026-09-18

blockbuster - 1.5.28
Ebuild name:

dev-python/blockbuster-1.5.28

Description

Utility to detect blocking calls in the async event loop

Added to portage

2026-09-18

boto3 - 1.43.97
Ebuild name:

dev-python/boto3-1.43.97

Description

The AWS SDK for Python

Added to portage

2026-09-18

botocore - 1.43.97
Ebuild name:

dev-python/botocore-1.43.97

Description

Low-level, data-driven core of boto 3

Added to portage

2026-09-18

cfn-lint - 1.57.0
Ebuild name:

dev-python/cfn-lint-1.57.0

Description

CloudFormation Linter

Added to portage

2026-09-18

elfutils - 0.196
Ebuild name:

dev-libs/elfutils-0.196

Description

Libraries/utilities to handle ELF objects (drop in replacement for libelf)

Added to portage

2026-09-18

firewalld - 2.5.2
Ebuild name:

net-firewall/firewalld-2.5.2

Description

Firewall daemon with D-Bus interface providing a dynamic firewall

Added to portage

2026-09-18

flang-rt - 21.1.8-r1
Ebuild name:

llvm-runtimes/flang-rt-21.1.8-r1

Description

LLVM's Fortran runtime

Added to portage

2026-09-18

flang-rt - 22.1.8-r1
Ebuild name:

llvm-runtimes/flang-rt-22.1.8-r1

Description

LLVM's Fortran runtime

Added to portage

2026-09-18

flang-rt - 23.1.1-r1
Ebuild name:

llvm-runtimes/flang-rt-23.1.1-r1

Description

LLVM's Fortran runtime

Added to portage

2026-09-18

gcc - 14.4.1_p20260917
Ebuild name:

sys-devel/gcc-14.4.1_p20260917

Description

The GNU Compiler Collection

Added to portage

2026-09-18

git-lfs - 3.8.0
Ebuild name:

dev-vcs/git-lfs-3.8.0

Description

Command line extension and specification for managing large files with git

Added to portage

2026-09-18

google-api-core - 2.38.0
Ebuild name:

dev-python/google-api-core-2.38.0

Description

Core Library for Google Client Libraries

Added to portage

2026-09-18

grafana-bin - 12.1.10
Ebuild name:

www-apps/grafana-bin-12.1.10

Description

Gorgeous metric viz, dashboards & editors for Graphite, InfluxDB & Ope

Added to portage

2026-09-18

grafana-bin - 12.2.10
Ebuild name:

www-apps/grafana-bin-12.2.10

Description

Gorgeous metric viz, dashboards & editors for Graphite, InfluxDB & Ope

Added to portage

2026-09-18

grafana-bin - 12.3.11
Ebuild name:

www-apps/grafana-bin-12.3.11

Description

Gorgeous metric viz, dashboards & editors for Graphite, InfluxDB & Ope

Added to portage

2026-09-18

grafana-bin - 12.4.11
Ebuild name:

www-apps/grafana-bin-12.4.11

Description

Gorgeous metric viz, dashboards & editors for Graphite, InfluxDB & Ope

Added to portage

2026-09-18

grafana-bin - 13.1.6
Ebuild name:

www-apps/grafana-bin-13.1.6

Description

Gorgeous metric viz, dashboards & editors for Graphite, InfluxDB & Open

Added to portage

2026-09-18

grafana-bin - 13.2.2
Ebuild name:

www-apps/grafana-bin-13.2.2

Description

Gorgeous metric viz, dashboards & editors for Graphite, InfluxDB & Open

Added to portage

2026-09-18

hatch-jupyter-builder - 0.10.0
Ebuild name:

dev-python/hatch-jupyter-builder-0.10.0

Description

A hatch plugin to help build Jupyter packages

Added to portage

2026-09-18

hidapi-hotplug - 0.15.0
Ebuild name:

dev-libs/hidapi-hotplug-0.15.0

Description

Fork of dev-libs/hidapi with hotplug support

Added to portage

2026-09-18

imapclient - 4.1.0
Ebuild name:

dev-python/imapclient-4.1.0

Description

easy-to-use, pythonic, and complete IMAP client library

Added to portage

2026-09-18

iminuit - 2.33.0
Ebuild name:

dev-python/iminuit-2.33.0

Description

Minuit numerical function minimization in Python

Added to portage

2026-09-18

inform-mode - 2.0.1
Ebuild name:

app-emacs/inform-mode-2.0.1

Description

A major mode for editing Inform programs

Added to portage

2026-09-18

kirigami-addons - 1.14.0
Ebuild name:

dev-libs/kirigami-addons-1.14.0

Description

Visual end user components for Kirigami-based applications

Added to portage

2026-09-18

libde265 - 1.1.3
Ebuild name:

media-libs/libde265-1.1.3

Description

Open h.265 video codec implementation

Added to portage

2026-09-18

libdwarf - 2.3.2
Ebuild name:

dev-libs/libdwarf-2.3.2

Description

Library intended to simplify reading (and writing) applications using DWARF

Added to portage

2026-09-18

libmaxminddb - 1.14.1
Ebuild name:

dev-libs/libmaxminddb-1.14.1

Description

C library for the MaxMind DB file format

Added to portage

2026-09-18

lyx - 2.5.3
Ebuild name:

app-office/lyx-2.5.3

Description

WYSIWYM (What You See Is What You Mean) document processor based on LaTeX

Added to portage

2026-09-18

moarvm - 2026.08
Ebuild name:

dev-lang/moarvm-2026.08

Description

A 6model-based VM for NQP and Raku

Added to portage

2026-09-18

multidict - 6.9.0
Ebuild name:

dev-python/multidict-6.9.0

Description

multidict implementation

Added to portage

2026-09-18

nqp - 2026.08
Ebuild name:

dev-lang/nqp-2026.08

Description

Not Quite Perl, a Raku bootstrapping compiler

Added to portage

2026-09-18

openrgb - 1.0
Ebuild name:

app-misc/openrgb-1.0

Description

Open source RGB lighting control

Added to portage

2026-09-18

openrgb-plugin-effects - 1.0
Ebuild name:

app-misc/openrgb-plugin-effects-1.0

Description

Plugin for OpenRGB with various Effects that can be synced acro

Added to portage

2026-09-18

openrgb-plugin-effects - 1.0_rc2-r1
Ebuild name:

app-misc/openrgb-plugin-effects-1.0_rc2-r1

Description

Plugin for OpenRGB with various Effects that can be sync

Added to portage

2026-09-18

openrgb-plugin-skin - 1.0_rc2-r1
Ebuild name:

app-misc/openrgb-plugin-skin-1.0_rc2-r1

Description

Plugin for OpenRGB that allows you to customize the look an

Added to portage

2026-09-18

openrgb-plugin-visualmap - 1.0
Ebuild name:

app-misc/openrgb-plugin-visualmap-1.0

Description

Plugin for OpenRGB to create virtual devices out of multiple

Added to portage

2026-09-18

openrgb-plugin-visualmap - 1.0_rc2-r1
Ebuild name:

app-misc/openrgb-plugin-visualmap-1.0_rc2-r1

Description

Plugin for OpenRGB to create virtual devices out of mu

Added to portage

2026-09-18

pandas - 3.0.6
Ebuild name:

dev-python/pandas-3.0.6

Description

Powerful data structures for data analysis and statistics

Added to portage

2026-09-18

pipewire - 1.6.9
Ebuild name:

media-video/pipewire-1.6.9

Description

Multimedia processing graphs

Added to portage

2026-09-18

platformdirs - 4.11.10
Ebuild name:

dev-python/platformdirs-4.11.10

Description

A small Python module for determining appropriate platform-specific

Added to portage

2026-09-18

pulseaudio-qt - 1.9.0
Ebuild name:

media-libs/pulseaudio-qt-1.9.0

Description

Qt bindings for libpulse

Added to portage

2026-09-18

pyproject-api - 1.11.2
Ebuild name:

dev-python/pyproject-api-1.11.2

Description

API to interact with the python pyproject.toml based projects

Added to portage

2026-09-18

python-discovery - 1.6.1
Ebuild name:

dev-python/python-discovery-1.6.1

Description

Python interpreter discovery

Added to portage

2026-09-18

quiche - 0.30.0
Ebuild name:

net-libs/quiche-0.30.0

Description

Implementation of the QUIC transport protocol and HTTP/3

Added to portage

2026-09-18

rakudo - 2026.08
Ebuild name:

dev-lang/rakudo-2026.08

Description

A compiler for the Raku programming language

Added to portage

2026-09-18

redis - 8.10.2
Ebuild name:

dev-db/redis-8.10.2

Description

A persistent caching system, key-value, and data structures database

Added to portage

2026-09-18

redis - 8.2.10
Ebuild name:

dev-db/redis-8.2.10

Description

A persistent caching system, key-value, and data structures database

Added to portage

2026-09-18

redis - 8.4.7
Ebuild name:

dev-db/redis-8.4.7

Description

A persistent caching system, key-value, and data structures database

Added to portage

2026-09-18

redis - 8.6.7
Ebuild name:

dev-db/redis-8.6.7

Description

A persistent caching system, key-value, and data structures database

Added to portage

2026-09-18

redis - 8.8.3
Ebuild name:

dev-db/redis-8.8.3

Description

A persistent caching system, key-value, and data structures database

Added to portage

2026-09-18

secret-service - 0-r2
Ebuild name:

virtual/secret-service-0-r2

Description

Virtual for a freedesktop.org Secret Service API provider

Added to portage

2026-09-18

sphinx-autodoc-typehints - 3.13.7
Ebuild name:

dev-python/sphinx-autodoc-typehints-3.13.7

Description

Type hints support for the Sphinx autodoc extension

Added to portage

2026-09-18

strace - 7.2
Ebuild name:

dev-debug/strace-7.2

Description

Useful diagnostic, instructional, and debugging tool

Added to portage

2026-09-18

stunnel - 5.81
Ebuild name:

net-misc/stunnel-5.81

Description

TLS/SSL - Port Wrapper

Added to portage

2026-09-18

tree-sitter - 0.26.0_p20260816-r1
Ebuild name:

dev-python/tree-sitter-0.26.0_p20260816-r1

Description

Python bindings to the Tree-sitter parsing library

Added to portage

2026-09-18

urwid - 4.1.5
Ebuild name:

dev-python/urwid-4.1.5

Description

Curses-based user interface library for Python

Added to portage

2026-09-18

uv - 0.12.16
Ebuild name:

dev-python/uv-0.12.16

Description

A Python package installer and resolver, written in Rust

Added to portage

2026-09-18

uv-build - 0.12.16
Ebuild name:

dev-python/uv-build-0.12.16

Description

PEP517 uv build backend

Added to portage

2026-09-18

virtualenv - 21.7.11
Ebuild name:

dev-python/virtualenv-21.7.11

Description

Virtual Python Environment builder

Added to portage

2026-09-18

virtualenv - 21.7.14
Ebuild name:

dev-python/virtualenv-21.7.14

Description

Virtual Python Environment builder

Added to portage

2026-09-18

wcwidth - 0.8.4
Ebuild name:

dev-python/wcwidth-0.8.4

Description

Measures number of Terminal column cells of wide-character codes

Added to portage

2026-09-18

wireplumber - 0.5.17
Ebuild name:

media-video/wireplumber-0.5.17

Description

Replacement for pipewire-media-session

Added to portage

2026-09-18

wordpress - 7.1.1
Ebuild name:

www-apps/wordpress-7.1.1

Description

Wordpress PHP and MySQL based content management system (CMS)

Added to portage

2026-09-18

xfsprogs - 7.2.0
Ebuild name:

sys-fs/xfsprogs-7.2.0

Description

XFS filesystem utilities

Added to portage

2026-09-18

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