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:

80920

userrating:

average rating: 1.2 (50 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.5 (34 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
2025-09-18
apulse - 0.1.14
Ebuild name:

media-sound/apulse-0.1.14

Description

PulseAudio emulation for ALSA

Added to portage

2025-09-18

blazesym_c - 0.1.4
Ebuild name:

dev-libs/blazesym_c-0.1.4

Description

C bindings for blazesym, a library for address symbolization and related

Added to portage

2025-09-18

bpftrace - 0.24.0
Ebuild name:

dev-debug/bpftrace-0.24.0

Description

High-level tracing language for eBPF

Added to portage

2025-09-18

driftnet - 1.5.0
Ebuild name:

net-analyzer/driftnet-1.5.0

Description

Watches network traffic and displays media from TCP streams observed

Added to portage

2025-09-18

element-desktop-bin - 1.11.112
Ebuild name:

net-im/element-desktop-bin-1.11.112

Description

A glossy Matrix collaboration client for desktop (binary packag

Added to portage

2025-09-18

esptool - 4.10.0
Ebuild name:

dev-embedded/esptool-4.10.0

Description

Utility to communicate with the ROM bootloader in Espressif ESP8266 and

Added to portage

2025-09-18

esptool - 5.1.0
Ebuild name:

dev-embedded/esptool-5.1.0

Description

Serial utility for flashing and interacting with Espressif ESP8266 and E

Added to portage

2025-09-18

fheroes2 - 1.1.11
Ebuild name:

games-engines/fheroes2-1.1.11

Description

Recreation of HoMM2 game engine

Added to portage

2025-09-18

gmtp - 1.3.11-r4
Ebuild name:

media-sound/gmtp-1.3.11-r4

Description

Simple MTP client for MP3 players

Added to portage

2025-09-18

jsoncons - 1.4.0
Ebuild name:

dev-cpp/jsoncons-1.4.0

Description

C++ header-only library for JSON and JSON-like data formats

Added to portage

2025-09-18

libfmt - 12.0.0
Ebuild name:

dev-libs/libfmt-12.0.0

Description

Small, safe and fast formatting library

Added to portage

2025-09-18

libwebsockets - 4.4.1-r1
Ebuild name:

net-libs/libwebsockets-4.4.1-r1

Description

A flexible pure-C library for implementing network protocols

Added to portage

2025-09-18

mathgl - 8.0.3
Ebuild name:

sci-libs/mathgl-8.0.3

Description

Math Graphics Library

Added to portage

2025-09-18

mesa - 25.2.3
Ebuild name:

media-libs/mesa-25.2.3

Description

OpenGL-like graphic library for Linux

Added to portage

2025-09-18

mesa_clc - 25.2.3
Ebuild name:

dev-util/mesa_clc-25.2.3

Description

mesa_clc tool used for building OpenCL C to SPIR-V

Added to portage

2025-09-18

microsoft-edge - 140.0.3485.66-r1
Ebuild name:

www-client/microsoft-edge-140.0.3485.66-r1

Description

The web browser from Microsoft

Added to portage

2025-09-18

microsoft-edge-beta - 140.0.3485.49-r1
Ebuild name:

www-client/microsoft-edge-beta-140.0.3485.49-r1

Description

The web browser from Microsoft

Added to portage

2025-09-18

microsoft-edge-beta - 140.0.3485.54-r1
Ebuild name:

www-client/microsoft-edge-beta-140.0.3485.54-r1

Description

The web browser from Microsoft

Added to portage

2025-09-18

microsoft-edge-beta - 141.0.3537.13-r1
Ebuild name:

www-client/microsoft-edge-beta-141.0.3537.13-r1

Description

The web browser from Microsoft

Added to portage

2025-09-18

microsoft-edge-dev - 141.0.3514.0-r1
Ebuild name:

www-client/microsoft-edge-dev-141.0.3514.0-r1

Description

The web browser from Microsoft

Added to portage

2025-09-18

microsoft-edge-dev - 141.0.3525.0-r1
Ebuild name:

www-client/microsoft-edge-dev-141.0.3525.0-r1

Description

The web browser from Microsoft

Added to portage

2025-09-18

microsoft-edge-dev - 141.0.3537.9-r1
Ebuild name:

www-client/microsoft-edge-dev-141.0.3537.9-r1

Description

The web browser from Microsoft

Added to portage

2025-09-18

openrgb - 1.0_rc2
Ebuild name:

app-misc/openrgb-1.0_rc2

Description

Open source RGB lighting control

Added to portage

2025-09-18

openrgb-plugin-effects - 1.0_rc2
Ebuild name:

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

Description

Plugin for OpenRGB with various Effects that can be synced

Added to portage

2025-09-18

openrgb-plugin-skin - 1.0_rc2
Ebuild name:

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

Description

Plugin for OpenRGB that allows you to customize the look and f

Added to portage

2025-09-18

openrgb-plugin-visualmap - 1.0_rc2
Ebuild name:

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

Description

Plugin for OpenRGB to create virtual devices out of multi

Added to portage

2025-09-18

vlc - 3.0.22_rc1-r2
Ebuild name:

media-video/vlc-3.0.22_rc1-r2

Description

Media player and framework with support for most multimedia files and

Added to portage

2025-09-18

2025-09-17
aspell-af - 0.50.0-r1
Ebuild name:

app-dicts/aspell-af-0.50.0-r1

Description

Aspell () language dictionary

Added to portage

2025-09-17

aspell-am - 0.03.1-r1
Ebuild name:

app-dicts/aspell-am-0.03.1-r1

Description

Aspell () language dictionary

Added to portage

2025-09-17

aspell-ar - 1.2.0-r1
Ebuild name:

app-dicts/aspell-ar-1.2.0-r1

Description

Aspell () language dictionary

Added to portage

2025-09-17

awscli - 1.42.32
Ebuild name:

app-admin/awscli-1.42.32

Description

Universal Command Line Environment for AWS

Added to portage

2025-09-17

boto3 - 1.40.32
Ebuild name:

dev-python/boto3-1.40.32

Description

The AWS SDK for Python

Added to portage

2025-09-17

botocore - 1.40.32
Ebuild name:

dev-python/botocore-1.40.32

Description

Low-level, data-driven core of boto 3

Added to portage

2025-09-17

cJSON - 1.7.19
Ebuild name:

dev-libs/cJSON-1.7.19

Description

Ultralightweight JSON parser in ANSI C

Added to portage

2025-09-17

ceph - 20.1.0-r2
Ebuild name:

sys-cluster/ceph-20.1.0-r2

Description

Ceph distributed filesystem

Added to portage

2025-09-17

claude-code - 1.0.117
Ebuild name:

dev-util/claude-code-1.0.117

Description

Claude Code - an agentic coding tool by Anthropic

Added to portage

2025-09-17

cmd2 - 3.0.0_beta1
Ebuild name:

dev-python/cmd2-3.0.0_beta1

Description

Extra features for standard library's cmd module

Added to portage

2025-09-17

cryptography - 46.0.1
Ebuild name:

dev-python/cryptography-46.0.1

Description

Library providing cryptographic recipes and primitives

Added to portage

2025-09-17

cython - 3.1.4
Ebuild name:

dev-python/cython-3.1.4

Description

A Python to C compiler

Added to portage

2025-09-17

dkms - 3.2.2
Ebuild name:

sys-kernel/dkms-3.2.2

Description

Dynamic Kernel Module Support

Added to portage

2025-09-17

dust - 1.2.3
Ebuild name:

sys-block/dust-1.2.3

Description

A more intuitive version of du

Added to portage

2025-09-17

erlang - 26.2.5.15
Ebuild name:

dev-lang/erlang-26.2.5.15

Description

Erlang programming language, runtime environment and libraries (OTP)

Added to portage

2025-09-17

erlang - 27.3.4.3
Ebuild name:

dev-lang/erlang-27.3.4.3

Description

Erlang programming language, runtime environment and libraries (OTP)

Added to portage

2025-09-17

erlang - 28.0.4
Ebuild name:

dev-lang/erlang-28.0.4

Description

Erlang programming language, runtime environment and libraries (OTP)

Added to portage

2025-09-17

erlang - 28.1
Ebuild name:

dev-lang/erlang-28.1

Description

Erlang programming language, runtime environment and libraries (OTP)

Added to portage

2025-09-17

expat - 2.7.2
Ebuild name:

dev-libs/expat-2.7.2

Description

Stream-oriented XML parser library

Added to portage

2025-09-17

folly - 2025.04.14.00-r2
Ebuild name:

dev-cpp/folly-2025.04.14.00-r2

Description

An open-source C++ library developed and used at Facebook

Added to portage

2025-09-17

ghostty - 1.2.0
Ebuild name:

x11-terms/ghostty-1.2.0

Description

Fast, feature-rich, and cross-platform terminal emulator

Added to portage

2025-09-17

ghostty-terminfo - 1.2.0
Ebuild name:

x11-terms/ghostty-terminfo-1.2.0

Description

Terminfo for ghostty, a fast, feature-rich, and cross-platform ter

Added to portage

2025-09-17

gmmlib - 22.8.2
Ebuild name:

media-libs/gmmlib-22.8.2

Description

Intel Graphics Memory Management Library

Added to portage

2025-09-17

google-api-python-client - 2.182.0
Ebuild name:

dev-python/google-api-python-client-2.182.0

Description

Google API Client for Python

Added to portage

2025-09-17

grpcio - 1.75.0
Ebuild name:

dev-python/grpcio-1.75.0

Description

HTTP/2-based RPC framework

Added to portage

2025-09-17

grpcio-status - 1.75.0
Ebuild name:

dev-python/grpcio-status-1.75.0

Description

Reference package for GRPC Python status proto mapping

Added to portage

2025-09-17

gtk4-layer-shell - 1.1.1-r1
Ebuild name:

gui-libs/gtk4-layer-shell-1.1.1-r1

Description

A library for using the Layer Shell Wayland protocol with GTK4.

Added to portage

2025-09-17

hypothesis - 6.139.1
Ebuild name:

dev-python/hypothesis-6.139.1

Description

A library for property based testing

Added to portage

2025-09-17

ibus-typing-booster - 2.27.75
Ebuild name:

app-i18n/ibus-typing-booster-2.27.75

Description

Completion input method for IBus

Added to portage

2025-09-17

libva-intel-media-driver - 25.3.4
Ebuild name:

media-libs/libva-intel-media-driver-25.3.4

Description

Intel Media Driver for VA-API (iHD)

Added to portage

2025-09-17

log4cplus - 2.1.2-r1
Ebuild name:

dev-libs/log4cplus-2.1.2-r1

Description

C++ port of the Log for Java (log4j) logging library

Added to portage

2025-09-17

m17n-db - 1.8.10
Ebuild name:

dev-db/m17n-db-1.8.10

Description

Database for the m17n library

Added to portage

2025-09-17

m17n-lib - 1.8.6
Ebuild name:

dev-libs/m17n-lib-1.8.6

Description

Multilingual Library for Unix/Linux

Added to portage

2025-09-17

mvfst - 2025.04.14.00-r1
Ebuild name:

dev-cpp/mvfst-2025.04.14.00-r1

Description

An implementation of the QUIC transport protocol

Added to portage

2025-09-17

nbclassic - 1.3.3
Ebuild name:

dev-python/nbclassic-1.3.3

Description

Jupyter Notebook as a Jupyter Server Extension

Added to portage

2025-09-17

ngx-auth-ldap - 0.1_p20240424
Ebuild name:

www-nginx/ngx-auth-ldap-0.1_p20240424

Description

LDAP authentication module for NGINX

Added to portage

2025-09-17

ngx-push-stream - 0.6.0
Ebuild name:

www-nginx/ngx-push-stream-0.6.0

Description

Added to portage

2025-09-17

notus-scanner - 22.7.2
Ebuild name:

net-analyzer/notus-scanner-22.7.2

Description

Notus is a vulnerability scanner for creating results from local

Added to portage

2025-09-17

openjdk - 25_p36
Ebuild name:

dev-java/openjdk-25_p36

Description

Open source implementation of the Java programming language

Added to portage

2025-09-17

openpgp-keys-gentoo-developers - 20250915
Ebuild name:

sec-keys/openpgp-keys-gentoo-developers-20250915

Description

Gentoo Authority Keys (GLEP 79)

Added to portage

2025-09-17

phonenumbers - 9.0.14
Ebuild name:

dev-python/phonenumbers-9.0.14

Description

Python port of Google's libphonenumber

Added to portage

2025-09-17

pymongo - 4.15.1
Ebuild name:

dev-python/pymongo-4.15.1

Description

Python driver for MongoDB

Added to portage

2025-09-17

pyopenssl - 25.3.0
Ebuild name:

dev-python/pyopenssl-25.3.0

Description

Python interface to the OpenSSL library

Added to portage

2025-09-17

pytest-lazy-fixtures - 1.4.0
Ebuild name:

dev-python/pytest-lazy-fixtures-1.4.0

Description

Allows you to use fixtures in @pytest.mark.parametrize

Added to portage

2025-09-17

pytest-mock - 3.15.1
Ebuild name:

dev-python/pytest-mock-3.15.1

Description

Thin-wrapper around the mock package for easier use with pytest

Added to portage

2025-09-17

qgpgme - 2.0.0-r2
Ebuild name:

dev-libs/qgpgme-2.0.0-r2

Description

GnuPG Made Easy is a library for making GnuPG easier to use (Qt bindings)

Added to portage

2025-09-17

rspamd - 3.13.0
Ebuild name:

mail-filter/rspamd-3.13.0

Description

Rapid spam filtering system

Added to portage

2025-09-17

subtitlecomposer - 0.8.2
Ebuild name:

media-video/subtitlecomposer-0.8.2

Description

Text-based subtitles editor

Added to portage

2025-09-17

sudo-rs - 0.2.8-r4
Ebuild name:

app-admin/sudo-rs-0.2.8-r4

Description

A memory safe implementation of sudo and su.

Added to portage

2025-09-17

thunderbird - 143.0
Ebuild name:

mail-client/thunderbird-143.0

Description

Thunderbird Mail Client

Added to portage

2025-09-17

thunderbird-bin - 143.0
Ebuild name:

mail-client/thunderbird-bin-143.0

Description

Thunderbird Mail Client

Added to portage

2025-09-17

tig - 2.6.0
Ebuild name:

dev-vcs/tig-2.6.0

Description

text mode interface for git

Added to portage

2025-09-17

wakeonlan - 0.42
Ebuild name:

net-misc/wakeonlan-0.42

Description

Client for Wake-On-LAN

Added to portage

2025-09-17

wiremix - 0.7.0
Ebuild name:

media-sound/wiremix-0.7.0

Description

A TUI mixer for PipeWire

Added to portage

2025-09-17

yash - 2.60
Ebuild name:

app-shells/yash-2.60

Description

Yash is a POSIX-compliant command line shell

Added to portage

2025-09-17

yubikey-manager - 5.8.0
Ebuild name:

app-crypt/yubikey-manager-5.8.0

Description

Python library and command line tool for configuring a YubiKey

Added to portage

2025-09-17

yubioath-flutter-bin - 7.1.1
Ebuild name:

app-crypt/yubioath-flutter-bin-7.1.1

Description

Yubico Authenticator for TOTP

Added to portage

2025-09-17

yubioath-flutter-bin - 7.2.3
Ebuild name:

app-crypt/yubioath-flutter-bin-7.2.3

Description

Yubico Authenticator for TOTP

Added to portage

2025-09-17

zoom - 6.6.0.4410
Ebuild name:

net-im/zoom-6.6.0.4410

Description

Video conferencing and web conferencing service

Added to portage

2025-09-17

zulucrypt - 7.0.0
Ebuild name:

app-crypt/zulucrypt-7.0.0

Description

Front end to cryptsetup

Added to portage

2025-09-17

rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2020 Sascha Nitsch Unternehmensberatung GmbH
Valid XHTML1.1 : Valid CSS : buttonmaker
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 78.8 ms