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:

81886

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-11-04
cloudflared - 2025.10.1
Ebuild name:

net-vpn/cloudflared-2025.10.1

Description

A command-line client and tunneling daemon for Cloudflare Tunnel

Added to portage

2025-11-04

gnuradio - 3.10.12.0-r1
Ebuild name:

net-wireless/gnuradio-3.10.12.0-r1

Description

Toolkit that provides signal processing blocks to implement soft

Added to portage

2025-11-04

golangci-lint - 2.6.0
Ebuild name:

dev-go/golangci-lint-2.6.0

Description

Fast linters runner for Go

Added to portage

2025-11-04

gr-fosphor - 0.0_p20210108-r3
Ebuild name:

net-analyzer/gr-fosphor-0.0_p20210108-r3

Description

gnuradio fosphor block (GPU spectrum display)

Added to portage

2025-11-04

laptop-mode-tools - 1.74-r1
Ebuild name:

app-laptop/laptop-mode-tools-1.74-r1

Description

Linux kernel laptop_mode user-space utilities

Added to portage

2025-11-04

lgogdownloader - 3.18
Ebuild name:

games-util/lgogdownloader-3.18

Description

Unofficial GOG.com downloader for Linux

Added to portage

2025-11-04

libffado - 2.4.9-r1
Ebuild name:

media-libs/libffado-2.4.9-r1

Description

Driver for IEEE1394 (Firewire) audio interfaces

Added to portage

2025-11-04

picard - 3.0_pre20251102
Ebuild name:

media-sound/picard-3.0_pre20251102

Description

Cross-platform music tagger

Added to portage

2025-11-04

pymol - 3.1.0-r1
Ebuild name:

sci-chemistry/pymol-3.1.0-r1

Description

Python-extensible molecular graphics system

Added to portage

2025-11-04

smplayer - 25.6.0_p20250903-r1
Ebuild name:

media-video/smplayer-25.6.0_p20250903-r1

Description

Great Qt GUI front-end for mplayer/mpv

Added to portage

2025-11-04

vivaldi-snapshot - 7.7.3851.3
Ebuild name:

www-client/vivaldi-snapshot-7.7.3851.3

Description

A browser for our friends

Added to portage

2025-11-04

2025-11-03
bash-completion - 2.17.0
Ebuild name:

app-shells/bash-completion-2.17.0

Description

Programmable Completion for bash

Added to portage

2025-11-03

bitarray - 3.8.0
Ebuild name:

dev-python/bitarray-3.8.0

Description

Efficient arrays of booleans -- C extension

Added to portage

2025-11-03

blessed - 1.23.0
Ebuild name:

dev-python/blessed-1.23.0

Description

Library for making terminal apps using colors, keyboard input and positio

Added to portage

2025-11-03

borgmatic - 2.0.11
Ebuild name:

app-backup/borgmatic-2.0.11

Description

Automatically create, prune and verify backups with borgbackup

Added to portage

2025-11-03

chromaprint - 1.6.0
Ebuild name:

media-libs/chromaprint-1.6.0

Description

Library implementing a custom algorithm for extracting audio fingerpri

Added to portage

2025-11-03

cpp-httplib - 0.27.0
Ebuild name:

dev-cpp/cpp-httplib-0.27.0

Description

C++ HTTP/HTTPS server and client library

Added to portage

2025-11-03

crengine-ng - 0.9.13
Ebuild name:

app-text/crengine-ng-0.9.13

Description

Cross-platform library designed to implement e-book readers

Added to portage

2025-11-03

dhcpcd-ui - 0.7.9-r1
Ebuild name:

net-misc/dhcpcd-ui-0.7.9-r1

Description

Desktop notification and configuration for dhcpcd

Added to portage

2025-11-03

dist-kernel - 6.12.57
Ebuild name:

virtual/dist-kernel-6.12.57

Description

Virtual to depend on any Distribution Kernel

Added to portage

2025-11-03

dist-kernel - 6.17.7
Ebuild name:

virtual/dist-kernel-6.17.7

Description

Virtual to depend on any Distribution Kernel

Added to portage

2025-11-03

dist-kernel - 6.6.116
Ebuild name:

virtual/dist-kernel-6.6.116

Description

Virtual to depend on any Distribution Kernel

Added to portage

2025-11-03

environs - 14.5.0
Ebuild name:

dev-python/environs-14.5.0

Description

Python library for simplified environment variable parsing

Added to portage

2025-11-03

freepg - 2.5.13
Ebuild name:

app-crypt/freepg-2.5.13

Description

GnuPG fork with improved RFC9850 compatibility

Added to portage

2025-11-03

fzf - 0.66.1
Ebuild name:

app-shells/fzf-0.66.1

Description

General-purpose command-line fuzzy finder, written in Golang

Added to portage

2025-11-03

gcc - 16.0.0_p20251102
Ebuild name:

sys-devel/gcc-16.0.0_p20251102

Description

The GNU Compiler Collection

Added to portage

2025-11-03

gentoo-kernel - 6.12.57
Ebuild name:

sys-kernel/gentoo-kernel-6.12.57

Description

Linux kernel built with Gentoo patches

Added to portage

2025-11-03

gentoo-kernel - 6.17.7
Ebuild name:

sys-kernel/gentoo-kernel-6.17.7

Description

Linux kernel built with Gentoo patches

Added to portage

2025-11-03

gentoo-kernel - 6.6.116
Ebuild name:

sys-kernel/gentoo-kernel-6.6.116

Description

Linux kernel built with Gentoo patches

Added to portage

2025-11-03

gentoo-kernel-bin - 6.12.57
Ebuild name:

sys-kernel/gentoo-kernel-bin-6.12.57

Description

Pre-built Linux kernel with Gentoo patches

Added to portage

2025-11-03

gentoo-kernel-bin - 6.17.7
Ebuild name:

sys-kernel/gentoo-kernel-bin-6.17.7

Description

Pre-built Linux kernel with Gentoo patches

Added to portage

2025-11-03

gentoo-kernel-bin - 6.6.116
Ebuild name:

sys-kernel/gentoo-kernel-bin-6.6.116

Description

Pre-built Linux kernel with Gentoo patches

Added to portage

2025-11-03

gentoo-sources - 6.12.57
Ebuild name:

sys-kernel/gentoo-sources-6.12.57

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2025-11-03

gentoo-sources - 6.17.7
Ebuild name:

sys-kernel/gentoo-sources-6.17.7

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2025-11-03

gentoo-sources - 6.6.116
Ebuild name:

sys-kernel/gentoo-sources-6.6.116

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2025-11-03

git-sources - 6.18_rc4
Ebuild name:

sys-kernel/git-sources-6.18_rc4

Description

The very latest -git version of the Linux kernel

Added to portage

2025-11-03

gle - 4.3.8-r1
Ebuild name:

sci-visualization/gle-4.3.8-r1

Description

Graphics Layout Engine

Added to portage

2025-11-03

gpxsee - 15.0
Ebuild name:

sci-geosciences/gpxsee-15.0

Description

Viewer and analyzer that supports gpx, tcx, kml, fit, igc and nmea file

Added to portage

2025-11-03

hypothesis - 6.144.0
Ebuild name:

dev-python/hypothesis-6.144.0

Description

A library for property based testing

Added to portage

2025-11-03

ig - 0.46.0
Ebuild name:

app-admin/ig-0.46.0

Description

Tools and framework for data collection and system inspection using eBPF

Added to portage

2025-11-03

incus - 6.18
Ebuild name:

app-containers/incus-6.18

Description

Modern, secure and powerful system container and virtual machine manager

Added to portage

2025-11-03

jellyfin-bin - 10.11.2
Ebuild name:

www-apps/jellyfin-bin-10.11.2

Description

Jellyfin puts you in control of managing and streaming your media

Added to portage

2025-11-03

katarakt - 0.3
Ebuild name:

app-text/katarakt-0.3

Description

A simple PDF viewer designed to use as much available screen space as possibl

Added to portage

2025-11-03

kitty - 0.44.0
Ebuild name:

x11-terms/kitty-0.44.0

Description

Fast, feature-rich, GPU-based terminal

Added to portage

2025-11-03

kitty-shell-integration - 0.44.0
Ebuild name:

x11-terms/kitty-shell-integration-0.44.0

Description

Shell integration scripts for kitty, a GPU-based terminal

Added to portage

2025-11-03

kitty-terminfo - 0.44.0
Ebuild name:

x11-terms/kitty-terminfo-0.44.0

Description

Terminfo for kitty, a GPU-based terminal emulator

Added to portage

2025-11-03

libdrm - 2.4.128
Ebuild name:

x11-libs/libdrm-2.4.128

Description

X.Org libdrm library

Added to portage

2025-11-03

libprojectm - 3.1.12-r4
Ebuild name:

media-libs/libprojectm-3.1.12-r4

Description

Graphical music visualization plugin similar to milkdrop

Added to portage

2025-11-03

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

media-libs/libva-intel-media-driver-25.4.2

Description

Intel Media Driver for VA-API (iHD)

Added to portage

2025-11-03

master-pdf-editor - 5.9.94
Ebuild name:

app-text/master-pdf-editor-5.9.94

Description

A complete solution for viewing and editing PDF files

Added to portage

2025-11-03

maxima - 5.48.1-r1
Ebuild name:

sci-mathematics/maxima-5.48.1-r1

Description

Free computer algebra environment based on Macsyma

Added to portage

2025-11-03

moto - 5.1.16
Ebuild name:

dev-python/moto-5.1.16

Description

Mock library for boto

Added to portage

2025-11-03

nextcloud - 31.0.10
Ebuild name:

www-apps/nextcloud-31.0.10

Description

Personal cloud that runs on your own server

Added to portage

2025-11-03

opentofu - 1.10.6
Ebuild name:

app-admin/opentofu-1.10.6

Description

The open source infrastructure as code tool

Added to portage

2025-11-03

podman-compose - 1.4.1
Ebuild name:

app-containers/podman-compose-1.4.1

Description

A script to run docker-compose.yml using Podman

Added to portage

2025-11-03

posframe - 1.4.4
Ebuild name:

app-emacs/posframe-1.4.4

Description

Pop up a frame at point

Added to portage

2025-11-03

postfix - 3.11_pre20251102
Ebuild name:

mail-mta/postfix-3.11_pre20251102

Description

A fast and secure drop-in replacement for sendmail

Added to portage

2025-11-03

pov-mode - 3.3-r1
Ebuild name:

app-emacs/pov-mode-3.3-r1

Description

Major mode for Povray scene files

Added to portage

2025-11-03

powerline - 2.5_p20221110
Ebuild name:

app-emacs/powerline-2.5_p20221110

Description

GNU Emacs version of the Vim powerline

Added to portage

2025-11-03

psutil - 7.1.3
Ebuild name:

dev-python/psutil-7.1.3

Description

Retrieve information on running processes and system utilization

Added to portage

2025-11-03

qmapshack - 1.18.1
Ebuild name:

sci-geosciences/qmapshack-1.18.1

Description

GPS mapping utility

Added to portage

2025-11-03

qtpbfimageplugin - 5.2
Ebuild name:

dev-qt/qtpbfimageplugin-5.2

Description

Qt image plugin for displaying Mapbox vector tiles

Added to portage

2025-11-03

qutebrowser - 3.6.1
Ebuild name:

www-client/qutebrowser-3.6.1

Description

Keyboard-driven, vim-like browser based on Python and Qt

Added to portage

2025-11-03

railties - 7.1.6-r1
Ebuild name:

dev-ruby/railties-7.1.6-r1

Description

Tools for creating, working with, and running Rails applications

Added to portage

2025-11-03

railties - 7.2.3-r1
Ebuild name:

dev-ruby/railties-7.2.3-r1

Description

Tools for creating, working with, and running Rails applications

Added to portage

2025-11-03

rgbds - 1.0.0
Ebuild name:

dev-util/rgbds-1.0.0

Description

Rednex Game Boy Development System

Added to portage

2025-11-03

sbcl - 2.5.10
Ebuild name:

dev-lisp/sbcl-2.5.10

Description

Steel Bank Common Lisp (SBCL) is an implementation of ANSI Common Lisp

Added to portage

2025-11-03

sonarr-bin - 4.0.16.2943
Ebuild name:

www-apps/sonarr-bin-4.0.16.2943

Description

Sonarr is a Smart PVR for newsgroup and bittorrent users

Added to portage

2025-11-03

sqlcl-bin - 25.2.2.199.0918
Ebuild name:

dev-db/sqlcl-bin-25.2.2.199.0918

Description

Oracle SQLcl is the new SQL*Plus

Added to portage

2025-11-03

vanilla-kernel - 6.12.57
Ebuild name:

sys-kernel/vanilla-kernel-6.12.57

Description

Linux kernel built from vanilla upstream sources

Added to portage

2025-11-03

vanilla-kernel - 6.17.7
Ebuild name:

sys-kernel/vanilla-kernel-6.17.7

Description

Linux kernel built from vanilla upstream sources

Added to portage

2025-11-03

vanilla-kernel - 6.6.116
Ebuild name:

sys-kernel/vanilla-kernel-6.6.116

Description

Linux kernel built from vanilla upstream sources

Added to portage

2025-11-03

vanilla-sources - 6.12.57
Ebuild name:

sys-kernel/vanilla-sources-6.12.57

Description

Full sources for the Linux kernel

Added to portage

2025-11-03

vanilla-sources - 6.17.7
Ebuild name:

sys-kernel/vanilla-sources-6.17.7

Description

Full sources for the Linux kernel

Added to portage

2025-11-03

vanilla-sources - 6.6.116
Ebuild name:

sys-kernel/vanilla-sources-6.6.116

Description

Full sources for the Linux kernel

Added to portage

2025-11-03

virtualbox-kvm - 7.1.14_pre20251103
Ebuild name:

app-emulation/virtualbox-kvm-7.1.14_pre20251103

Description

Family of powerful x86 virtualization products for

Added to portage

2025-11-03

virtualbox-kvm - 7.2.4_pre20251103
Ebuild name:

app-emulation/virtualbox-kvm-7.2.4_pre20251103

Description

Family of powerful x86 virtualization products for e

Added to portage

2025-11-03

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: 76.0 ms