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:

48212

userrating:

average rating: 1.5 (4 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: 2.1 (7 votes) (1=very good 6=terrible)
Your rating:
Very good (1) Good (2) ok (3) average (4) bad (5) terrible (6)

back



Other free services
toURL.org
Shorten long
URLs to short
links like
http://tourl.org/2
tourl.org
.
Reverse DNS lookup
Find out which hostname(s)
resolve to a
given IP or other hostnames for the server
www.reversednslookup.org

New Packages

- as rdf newsfeed
- as rss newsfeed
- as Atom newsfeed
2019-08-24
GromacsWrapper - 0.8.0
Ebuild name:

sci-chemistry/GromacsWrapper-0.8.0

Description

Python framework for Gromacs

Added to portage

2019-08-24

ccrypt - 1.11
Ebuild name:

app-crypt/ccrypt-1.11

Description

Encryption and decryption

Added to portage

2019-08-24

chromium - 77.0.3865.42
Ebuild name:

www-client/chromium-77.0.3865.42

Description

Open-source version of Google Chrome web browser

Added to portage

2019-08-24

diskimage-builder - 2.26.1
Ebuild name:

app-emulation/diskimage-builder-2.26.1

Description

Golden Disk Image builder.

Added to portage

2019-08-24

displaycal - 3.8.5.0
Ebuild name:

media-gfx/displaycal-3.8.5.0

Description

Display calibration and characterization powered by Argyll CMS

Added to portage

2019-08-24

eventlet - 0.25.1
Ebuild name:

dev-python/eventlet-0.25.1

Description

Highly concurrent networking library

Added to portage

2019-08-24

geeqie - 1.5.1
Ebuild name:

media-gfx/geeqie-1.5.1

Description

A lightweight GTK image viewer forked from GQview

Added to portage

2019-08-24

gnome-desktop - 3.30.2.3
Ebuild name:

gnome-base/gnome-desktop-3.30.2.3

Description

Library with common API for various GNOME modules

Added to portage

2019-08-24

harfbuzz - 2.6.1
Ebuild name:

media-libs/harfbuzz-2.6.1

Description

An OpenType text shaping engine

Added to portage

2019-08-24

hiawatha-monitor - 1.6
Ebuild name:

www-apps/hiawatha-monitor-1.6

Description

Monitoring application for www-servers/hiawatha

Added to portage

2019-08-24

kismet - 2019.08.2
Ebuild name:

net-wireless/kismet-2019.08.2

Description

IEEE 802.11 wireless LAN sniffer

Added to portage

2019-08-24

ldb - 2.0.5
Ebuild name:

sys-libs/ldb-2.0.5

Description

An LDAP-like embedded database

Added to portage

2019-08-24

libdbi-drivers - 0.9.0-r1
Ebuild name:

dev-db/libdbi-drivers-0.9.0-r1

Description

The libdbi-drivers project maintains drivers for libdbi

Added to portage

2019-08-24

libinsane - 1.0.1
Ebuild name:

media-libs/libinsane-1.0.1

Description

Crossplatform access to image scanners

Added to portage

2019-08-24

libnftnl - 1.1.4
Ebuild name:

net-libs/libnftnl-1.1.4

Description

Netlink API to the in-kernel nf_tables subsystem

Added to portage

2019-08-24

libsoup - 2.66.2
Ebuild name:

net-libs/libsoup-2.66.2

Description

HTTP client/server library for GNOME

Added to portage

2019-08-24

lldpd - 1.0.4
Ebuild name:

net-misc/lldpd-1.0.4

Description

Implementation of IEEE 802.1ab (LLDP)

Added to portage

2019-08-24

mesa - 19.1.5
Ebuild name:

media-libs/mesa-19.1.5

Description

OpenGL-like graphic library for Linux

Added to portage

2019-08-24

mycli - 1.20.1
Ebuild name:

dev-db/mycli-1.20.1

Description

CLI for MySQL Database with auto-completion and syntax highlighting

Added to portage

2019-08-24

nautilus - 3.30.5-r1
Ebuild name:

gnome-base/nautilus-3.30.5-r1

Description

Default file manager for the GNOME desktop

Added to portage

2019-08-24

nextcloud - 14.0.14
Ebuild name:

www-apps/nextcloud-14.0.14

Description

Personal cloud that runs on your own server

Added to portage

2019-08-24

nextcloud - 15.0.11
Ebuild name:

www-apps/nextcloud-15.0.11

Description

Personal cloud that runs on your own server

Added to portage

2019-08-24

nextcloud - 16.0.4
Ebuild name:

www-apps/nextcloud-16.0.4

Description

Personal cloud that runs on your own server

Added to portage

2019-08-24

nftables - 0.9.2
Ebuild name:

net-firewall/nftables-0.9.2

Description

Linux kernel (3.13+) firewall, NAT and packet mangling tools

Added to portage

2019-08-24

ntlm-auth - 1.4.0
Ebuild name:

dev-python/ntlm-auth-1.4.0

Description

Calculates NTLM Authentication codes

Added to portage

2019-08-24

numkit - 1.1.2
Ebuild name:

sci-libs/numkit-1.1.2

Description

Numerical first aid kit (with numpy/scipy)

Added to portage

2019-08-24

openssl - 1.0.2s-r1
Ebuild name:

dev-libs/openssl-1.0.2s-r1

Description

full-strength general purpose cryptography library (including SSL and TL

Added to portage

2019-08-24

openssl - 1.1.0k-r1
Ebuild name:

dev-libs/openssl-1.1.0k-r1

Description

full-strength general purpose cryptography library (including SSL and TL

Added to portage

2019-08-24

openssl - 1.1.1c-r1
Ebuild name:

dev-libs/openssl-1.1.1c-r1

Description

full-strength general purpose cryptography library (including SSL and TL

Added to portage

2019-08-24

openssl-compat - 1.0.2s
Ebuild name:

dev-libs/openssl-compat-1.0.2s

Description

full-strength general purpose cryptography library (including SSL an

Added to portage

2019-08-24

paperwork - 1.3.0
Ebuild name:

app-text/paperwork-1.3.0

Description

a personal document manager for scanned documents (and PDFs)

Added to portage

2019-08-24

paperwork-backend - 1.3.0
Ebuild name:

app-text/paperwork-backend-1.3.0

Description

Backend part of Paperwork (Python API, no UI)

Added to portage

2019-08-24

pecan - 1.3.3-r1
Ebuild name:

dev-python/pecan-1.3.3-r1

Description

A WSGI object-dispatching web framework, lean, fast, with few dependenci

Added to portage

2019-08-24

platformio - 4.0.1
Ebuild name:

dev-embedded/platformio-4.0.1

Description

An open source ecosystem for IoT development

Added to portage

2019-08-24

poppler - 0.80.0
Ebuild name:

app-text/poppler-0.80.0

Description

PDF rendering library based on the xpdf-3.0 code base

Added to portage

2019-08-24

puppet - 6.8.0
Ebuild name:

app-admin/puppet-6.8.0

Description

A system automation and configuration management software.

Added to portage

2019-08-24

puppet-agent - 6.8.0
Ebuild name:

app-admin/puppet-agent-6.8.0

Description

general puppet client utils along with hiera and facter

Added to portage

2019-08-24

puppetdb - 6.5.0
Ebuild name:

app-admin/puppetdb-6.5.0

Description

PuppetDB collects data generated by Puppet.

Added to portage

2019-08-24

puppetdb-termini - 6.5.0
Ebuild name:

dev-ruby/puppetdb-termini-6.5.0

Description

Library needed to connect puppet to puppetdb

Added to portage

2019-08-24

r10k - 3.3.1
Ebuild name:

app-admin/r10k-3.3.1

Description

Puppet environment and module deployment

Added to portage

2019-08-24

samba - 4.10.7
Ebuild name:

net-fs/samba-4.10.7

Description

Samba Suite Version 4

Added to portage

2019-08-24

samba - 4.11.0_rc2
Ebuild name:

net-fs/samba-4.11.0_rc2

Description

Samba Suite Version 4

Added to portage

2019-08-24

scheme-complete - 0.9.8
Ebuild name:

app-emacs/scheme-complete-0.9.8

Description

Scheme tab-completion and word-completion for Emacs

Added to portage

2019-08-24

scss-mode - 0.5.0_p20150107
Ebuild name:

app-emacs/scss-mode-0.5.0_p20150107

Description

Major mode for editing SCSS files in Emacs

Added to portage

2019-08-24

scss-mode - 0.5.0_p20180123
Ebuild name:

app-emacs/scss-mode-0.5.0_p20180123

Description

Major mode for editing SCSS files in Emacs

Added to portage

2019-08-24

sigil - 0.9.17
Ebuild name:

app-text/sigil-0.9.17

Description

Multi-platform WYSIWYG ebook editor for ePub format

Added to portage

2019-08-24

spire - 0
Ebuild name:

acct-group/spire-0

Description

Added to portage

2019-08-24

spire - 0
Ebuild name:

acct-user/spire-0

Description

user for spiffe runtime environment

Added to portage

2019-08-24

squashfs-tools-ng - 0.6
Ebuild name:

sys-fs/squashfs-tools-ng-0.6

Description

A new set of tools for working with SquashFS images

Added to portage

2019-08-24

tdb - 1.4.2
Ebuild name:

sys-libs/tdb-1.4.2

Description

A simple database API

Added to portage

2019-08-24

2019-08-23
autoprefixer-rails - 9.6.1.1
Ebuild name:

dev-ruby/autoprefixer-rails-9.6.1.1

Description

Add vendor prefixes to CSS rules using values from the Can I Us

Added to portage

2019-08-23

backports-unittest-mock - 1.5
Ebuild name:

dev-python/backports-unittest-mock-1.5

Description

Backport of unittest.mock

Added to portage

2019-08-23

freeipmi - 1.6.4
Ebuild name:

sys-libs/freeipmi-1.6.4

Description

Provides Remote-Console and System Management Software as per IPMI v1.5/2.0

Added to portage

2019-08-23

http-accept - 2.1.0
Ebuild name:

dev-ruby/http-accept-2.1.0

Description

Parse Accept and Accept-Language HTTP headers

Added to portage

2019-08-23

libobjc2 - 2.0
Ebuild name:

gnustep-base/libobjc2-2.0

Description

GNUstep Objective-C runtime

Added to portage

2019-08-23

mew - 6.8
Ebuild name:

app-emacs/mew-6.8

Description

Great MIME mail reader for Emacs/XEmacs

Added to portage

2019-08-23

mysql - 5.6.45-r2
Ebuild name:

dev-db/mysql-5.6.45-r2

Description

A fast, multi-threaded, multi-user SQL database server

Added to portage

2019-08-23

mysql - 5.7.26-r1
Ebuild name:

dev-db/mysql-5.7.26-r1

Description

A fast, multi-threaded, multi-user SQL database server

Added to portage

2019-08-23

mysql - 5.7.27-r1
Ebuild name:

dev-db/mysql-5.7.27-r1

Description

A fast, multi-threaded, multi-user SQL database server

Added to portage

2019-08-23

mysql-connector-c - 8.0.17-r3
Ebuild name:

dev-db/mysql-connector-c-8.0.17-r3

Description

C client library for MariaDB/MySQL

Added to portage

2019-08-23

percona-server - 5.7.26.29-r1
Ebuild name:

dev-db/percona-server-5.7.26.29-r1

Description

A fast, multi-threaded, multi-user SQL database server

Added to portage

2019-08-23

pkgcheck - 0.6.0
Ebuild name:

dev-util/pkgcheck-0.6.0

Description

pkgcore-based QA utility

Added to portage

2019-08-23

pkgcore - 0.10.0
Ebuild name:

sys-apps/pkgcore-0.10.0

Description

a framework for package management

Added to portage

2019-08-23

pov-mode - 3.3-r1
Ebuild name:

app-emacs/pov-mode-3.3-r1

Description

Major mode for Povray scene files

Added to portage

2019-08-23

pychroot - 0.10.0
Ebuild name:

dev-python/pychroot-0.10.0

Description

a python library and cli tool that simplify chroot handling

Added to portage

2019-08-23

s-nail - 14.9.15
Ebuild name:

mail-client/s-nail-14.9.15

Description

Enhanced mailx-compatible mail client based on Hierloom mailx (nail)

Added to portage

2019-08-23

shotwell - 0.30.7
Ebuild name:

media-gfx/shotwell-0.30.7

Description

Open source photo manager for GNOME

Added to portage

2019-08-23

snakeoil - 0.8.1
Ebuild name:

dev-python/snakeoil-0.8.1

Description

misc common functionality and useful optimizations

Added to portage

2019-08-23

systemd - 243_rc2
Ebuild name:

sys-apps/systemd-243_rc2

Description

System and service manager for Linux

Added to portage

2019-08-23

timezone-data - 2019b-r2
Ebuild name:

sys-libs/timezone-data-2019b-r2

Description

Timezone data (/usr/share/zoneinfo) and utilities (tzselect/zic/zdu

Added to portage

2019-08-23

xfsprogs - 5.2.1
Ebuild name:

sys-fs/xfsprogs-5.2.1

Description

xfs filesystem utilities

Added to portage

2019-08-23

rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2018 Sascha Nitsch Unternehmensberatung UG(haftungsbeschänkt)
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: 86.0 ms