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:

82642

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.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-12-29
aurorae - 6.4.5
Ebuild name:

kde-plasma/aurorae-6.4.5

Description

Themeable window decoration for KWin

Added to portage

2025-12-29

breeze - 6.4.5
Ebuild name:

kde-plasma/breeze-6.4.5

Description

Breeze visual style for the Plasma desktop

Added to portage

2025-12-29

git-sources - 6.19_rc3
Ebuild name:

sys-kernel/git-sources-6.19_rc3

Description

The very latest -git version of the Linux kernel

Added to portage

2025-12-29

kactivitymanagerd - 6.4.5
Ebuild name:

kde-plasma/kactivitymanagerd-6.4.5

Description

System service to manage user's activities, track the usage patt

Added to portage

2025-12-29

kde-cli-tools-common - 6.4.5
Ebuild name:

kde-plasma/kde-cli-tools-common-6.4.5

Description

Added to portage

2025-12-29

kdecoration - 6.4.5
Ebuild name:

kde-plasma/kdecoration-6.4.5

Description

Plugin based library to create window decorations

Added to portage

2025-12-29

kdesu-gui - 6.4.5
Ebuild name:

kde-plasma/kdesu-gui-6.4.5

Description

Graphical frontend for KDE Frameworks' kdesu

Added to portage

2025-12-29

keditfiletype - 6.4.5
Ebuild name:

kde-plasma/keditfiletype-6.4.5

Description

File Type Editor

Added to portage

2025-12-29

kglobalacceld - 6.4.5
Ebuild name:

kde-plasma/kglobalacceld-6.4.5

Description

Daemon providing Global Keyboard Shortcut (Accelerator) functionalit

Added to portage

2025-12-29

kpipewire - 6.4.5
Ebuild name:

kde-plasma/kpipewire-6.4.5

Description

Components relating to Flatpak pipewire use in Plasma

Added to portage

2025-12-29

kscreenlocker - 6.4.5
Ebuild name:

kde-plasma/kscreenlocker-6.4.5

Description

Library and components for secure lock screen architecture

Added to portage

2025-12-29

kwayland - 6.4.5
Ebuild name:

kde-plasma/kwayland-6.4.5

Description

Qt-style API to interact with the wayland-client API

Added to portage

2025-12-29

kwayland-integration - 6.4.5
Ebuild name:

kde-plasma/kwayland-integration-6.4.5

Description

Provides KWindowSystem integration plugin for Wayland

Added to portage

2025-12-29

kwin - 6.4.5-r1
Ebuild name:

kde-plasma/kwin-6.4.5-r1

Description

Flexible, composited Window Manager for windowing systems on Linux

Added to portage

2025-12-29

kwin-x11 - 6.4.5
Ebuild name:

kde-plasma/kwin-x11-6.4.5

Description

Flexible, composited X window manager

Added to portage

2025-12-29

layer-shell-qt - 6.4.5
Ebuild name:

kde-plasma/layer-shell-qt-6.4.5

Description

Qt component to allow applications make use of Wayland wl-layer-she

Added to portage

2025-12-29

lcov - 2.4
Ebuild name:

dev-util/lcov-2.4

Description

A graphical front-end for GCC's coverage testing tool gcov

Added to portage

2025-12-29

libkscreen - 6.4.5
Ebuild name:

kde-plasma/libkscreen-6.4.5

Description

Plasma screen management library

Added to portage

2025-12-29

libksysguard - 6.4.5
Ebuild name:

kde-plasma/libksysguard-6.4.5

Description

Task management and system monitoring library

Added to portage

2025-12-29

libplasma - 6.4.5
Ebuild name:

kde-plasma/libplasma-6.4.5

Description

Plasma library and runtime components based upon KF6 and Qt6

Added to portage

2025-12-29

milou - 6.4.5
Ebuild name:

kde-plasma/milou-6.4.5

Description

Dedicated search application built on top of Baloo

Added to portage

2025-12-29

netavark - 1.17.1
Ebuild name:

app-containers/netavark-1.17.1

Description

A container network stack

Added to portage

2025-12-29

newsboat - 2.42
Ebuild name:

net-news/newsboat-2.42

Description

An RSS/Atom feed reader for text terminals

Added to portage

2025-12-29

parseclj - 1.1.1
Ebuild name:

app-emacs/parseclj-1.1.1

Description

Clojure Parser for Emacs Lisp

Added to portage

2025-12-29

plasma-activities - 6.4.5
Ebuild name:

kde-plasma/plasma-activities-6.4.5

Description

Core components for KDE's Activities System

Added to portage

2025-12-29

plasma-activities-stats - 6.4.5
Ebuild name:

kde-plasma/plasma-activities-stats-6.4.5

Description

Library for accessing usage data collected by the activiti

Added to portage

2025-12-29

plasma-integration - 6.4.5
Ebuild name:

kde-plasma/plasma-integration-6.4.5

Description

Qt Platform Theme integration plugins for the Plasma workspaces

Added to portage

2025-12-29

plasma-login-sessions - 6.4.5
Ebuild name:

kde-plasma/plasma-login-sessions-6.4.5

Description

KDE Plasma login sessions

Added to portage

2025-12-29

plasma-workspace - 6.4.5-r3
Ebuild name:

kde-plasma/plasma-workspace-6.4.5-r3

Description

KDE Plasma workspace

Added to portage

2025-12-29

plasma5support - 6.4.5
Ebuild name:

kde-plasma/plasma5support-6.4.5

Description

Support components for porting from KF5/Qt5 to KF6/Qt6

Added to portage

2025-12-29

polkit-kde-agent - 6.4.5
Ebuild name:

kde-plasma/polkit-kde-agent-6.4.5

Description

PolKit agent module for KDE Plasma

Added to portage

2025-12-29

pwsh - 7.5.4-r2
Ebuild name:

app-shells/pwsh-7.5.4-r2

Description

Cross-platform automation and configuration tool

Added to portage

2025-12-29

qmidiarp - 0.7.2
Ebuild name:

media-sound/qmidiarp-0.7.2

Description

Arpeggiator, sequencer and MIDI LFO for ALSA

Added to portage

2025-12-29

sedlex - 3.7
Ebuild name:

dev-ml/sedlex-3.7

Description

Added to portage

2025-12-29

tlfloat - 1.15.0_p20250711
Ebuild name:

dev-cpp/tlfloat-1.15.0_p20250711

Description

C++ template library for floating point operations

Added to portage

2025-12-29

xdg-desktop-portal-kde - 6.4.5
Ebuild name:

kde-plasma/xdg-desktop-portal-kde-6.4.5

Description

Backend implementation for xdg-desktop-portal that is using

Added to portage

2025-12-29

xwaylandvideobridge - 0.4.0_p20250215-r1
Ebuild name:

gui-apps/xwaylandvideobridge-0.4.0_p20250215-r1

Description

Screenshare Wayland windows to XWayland apps

Added to portage

2025-12-29

2025-12-28
aotriton-bin - 0.11.1b-r1
Ebuild name:

sci-libs/aotriton-bin-0.11.1b-r1

Description

Ahead of Time (AOT) Triton Math Library (binary package)

Added to portage

2025-12-28

aotriton-bin - 0.11b-r1
Ebuild name:

sci-libs/aotriton-bin-0.11b-r1

Description

Ahead of Time (AOT) Triton Math Library (binary package)

Added to portage

2025-12-28

automake-vanilla - 1.11.6
Ebuild name:

dev-build/automake-vanilla-1.11.6

Description

Used to generate Makefile.in from Makefile.am

Added to portage

2025-12-28

automake-vanilla - 1.15.1
Ebuild name:

dev-build/automake-vanilla-1.15.1

Description

Used to generate Makefile.in from Makefile.am

Added to portage

2025-12-28

automake-vanilla - 1.16.5
Ebuild name:

dev-build/automake-vanilla-1.16.5

Description

Used to generate Makefile.in from Makefile.am

Added to portage

2025-12-28

caffe2 - 2.9.1-r2
Ebuild name:

sci-ml/caffe2-2.9.1-r2

Description

A deep learning framework

Added to portage

2025-12-28

clr-loader - 0.2.9
Ebuild name:

dev-python/clr-loader-0.2.9

Description

Generic pure Python loader for .NET runtimes

Added to portage

2025-12-28

dry-core - 1.2.0
Ebuild name:

dev-ruby/dry-core-1.2.0

Description

A toolset of small support modules used throughout the dry-rb ecosystem

Added to portage

2025-12-28

duplicati - 2.2.0.1.2025.11.09
Ebuild name:

app-backup/duplicati-2.2.0.1.2025.11.09

Description

Backup client that securely stores encrypted, incremental,

Added to portage

2025-12-28

faraday-follow_redirects - 0.5.0
Ebuild name:

dev-ruby/faraday-follow_redirects-0.5.0

Description

Perform multipart-post requests using Faraday

Added to portage

2025-12-28

faraday-multipart - 1.2.0
Ebuild name:

dev-ruby/faraday-multipart-1.2.0

Description

Perform multipart-post requests using Faraday

Added to portage

2025-12-28

faraday-retry - 2.4.0
Ebuild name:

dev-ruby/faraday-retry-2.4.0

Description

Faraday adapter for Net

Added to portage

2025-12-28

gemato - 20.11
Ebuild name:

app-portage/gemato-20.11

Description

Stand-alone Manifest generation & verification tool

Added to portage

2025-12-28

homebank - 5.9.7
Ebuild name:

app-office/homebank-5.9.7

Description

Free, easy, personal accounting for everyone

Added to portage

2025-12-28

intellij-idea - 2025.3.1-r1
Ebuild name:

dev-util/intellij-idea-2025.3.1-r1

Description

A complete toolset for web, mobile and enterprise development

Added to portage

2025-12-28

intellij-idea - 2025.3.1-r2
Ebuild name:

dev-util/intellij-idea-2025.3.1-r2

Description

A complete toolset for web, mobile and enterprise development

Added to portage

2025-12-28

jdupes - 1.30.0-r2
Ebuild name:

app-misc/jdupes-1.30.0-r2

Description

Identify duplicate files on the filesystem

Added to portage

2025-12-28

joplin-desktop - 3.5.9
Ebuild name:

app-office/joplin-desktop-3.5.9

Description

Secure note taking and to-do app with synchronization capabilities

Added to portage

2025-12-28

langkit-contrib - 26.0.0
Ebuild name:

dev-ada/langkit-contrib-26.0.0

Description

A Python framework to generate language parsers - Contrib

Added to portage

2025-12-28

libadalang - 26.0.0
Ebuild name:

dev-ada/libadalang-26.0.0

Description

high performance semantic engine for the Ada programming language

Added to portage

2025-12-28

mptcpd - 0.14
Ebuild name:

net-misc/mptcpd-0.14

Description

Daemon that performs multipath TCP path management related operations.

Added to portage

2025-12-28

netcoredbg - 3.1.3.1062
Ebuild name:

dev-dotnet/netcoredbg-3.1.3.1062

Description

NetCoreDbg is a managed code debugger with MI interface for CoreCL

Added to portage

2025-12-28

nvc - 1.18.2-r1
Ebuild name:

sci-electronics/nvc-1.18.2-r1

Description

NVC is a VHDL compiler and simulator

Added to portage

2025-12-28

odamex - 12.0.0
Ebuild name:

games-engines/odamex-12.0.0

Description

Online multiplayer free software engine for DOOM

Added to portage

2025-12-28

pdf-reader - 2.15.1
Ebuild name:

dev-ruby/pdf-reader-2.15.1

Description

PDF parser conforming as much as possible to the PDF specification from

Added to portage

2025-12-28

pkg-info - 0.6-r1
Ebuild name:

app-emacs/pkg-info-0.6-r1

Description

Provide information about Emacs packages

Added to portage

2025-12-28

polychromatic - 0.9.6
Ebuild name:

sys-apps/polychromatic-0.9.6

Description

RGB lighting management software for GNU/Linux powered by OpenRazer

Added to portage

2025-12-28

puppet-mode - 0.4-r1
Ebuild name:

app-emacs/puppet-mode-0.4-r1

Description

Emacs major mode for editing Puppet manifests

Added to portage

2025-12-28

pygresql - 6.2.1
Ebuild name:

dev-python/pygresql-6.2.1

Description

A Python interface for the PostgreSQL database

Added to portage

2025-12-28

pytest-gitconfig - 0.9.0
Ebuild name:

dev-python/pytest-gitconfig-0.9.0

Description

Provide a Git config sandbox for testing

Added to portage

2025-12-28

scss-mode - 0.5.0_p20180123-r2
Ebuild name:

app-emacs/scss-mode-0.5.0_p20180123-r2

Description

Major mode for editing SCSS files in Emacs

Added to portage

2025-12-28

session - 2.4b-r1
Ebuild name:

app-emacs/session-2.4b-r1

Description

When you start Emacs, Session restores various variables from your last s

Added to portage

2025-12-28

sonarr-bin - 4.0.16.2946
Ebuild name:

www-apps/sonarr-bin-4.0.16.2946

Description

Sonarr is a Smart PVR for newsgroup and bittorrent users

Added to portage

2025-12-28

sqlite3 - 2.9.0
Ebuild name:

dev-ruby/sqlite3-2.9.0

Description

An extension library to access a SQLite database from Ruby

Added to portage

2025-12-28

sumibi - 0.7.4-r1
Ebuild name:

app-emacs/sumibi-0.7.4-r1

Description

Statistical Japanese input method using the Internet as a large corpus

Added to portage

2025-12-28

tempo-snippets - 0.1.5-r1
Ebuild name:

app-emacs/tempo-snippets-0.1.5-r1

Description

Visual insertion of tempo templates

Added to portage

2025-12-28

treepy - 0.1.2-r1
Ebuild name:

app-emacs/treepy-0.1.2-r1

Description

Generic tree traversing tools for Emacs Lisp

Added to portage

2025-12-28

visual-basic-mode - 1.5-r1
Ebuild name:

app-emacs/visual-basic-mode-1.5-r1

Description

A mode for editing Visual Basic programs

Added to portage

2025-12-28

yaml-mode - 0.0.16-r1
Ebuild name:

app-emacs/yaml-mode-0.0.16-r1

Description

A major mode for GNU Emacs for editing YAML files

Added to portage

2025-12-28

zenburn - 20110907-r2
Ebuild name:

app-emacs/zenburn-20110907-r2

Description

Zenburn color theme for Emacs

Added to portage

2025-12-28

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