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:

43599

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
2018-11-16
acpid - 2.0.31
Ebuild name:

sys-power/acpid-2.0.31

Description

Daemon for Advanced Configuration and Power Interface

Added to portage

2018-11-16

consul - 1.4.0
Ebuild name:

app-admin/consul-1.4.0

Description

A tool for service discovery, monitoring and configuration

Added to portage

2018-11-16

dnscrypt-proxy - 2.0.18
Ebuild name:

net-dns/dnscrypt-proxy-2.0.18

Description

A flexible DNS proxy, with support for encrypted DNS protocols

Added to portage

2018-11-16

drone - 0.8.9
Ebuild name:

dev-util/drone-0.8.9

Description

A Continuous Delivery platform built on Docker, written in Go

Added to portage

2018-11-16

drone-cli - 1.0.1
Ebuild name:

dev-util/drone-cli-1.0.1

Description

Command-line interface for Drone

Added to portage

2018-11-16

firefox - 63.0.3
Ebuild name:

www-client/firefox-63.0.3

Description

Firefox Web Browser

Added to portage

2018-11-16

firefox-bin - 63.0.3
Ebuild name:

www-client/firefox-bin-63.0.3

Description

Firefox Web Browser

Added to portage

2018-11-16

keyutils - 1.6
Ebuild name:

sys-apps/keyutils-1.6

Description

Linux Key Management Utilities

Added to portage

2018-11-16

kodi-audiodecoder-modplug - 1.1.0-r1
Ebuild name:

media-plugins/kodi-audiodecoder-modplug-1.1.0-r1

Description

Modplug decoder addon for Kodi

Added to portage

2018-11-16

kodi-audiodecoder-modplug - 2.0.0
Ebuild name:

media-plugins/kodi-audiodecoder-modplug-2.0.0

Description

Modplug decoder addon for Kodi

Added to portage

2018-11-16

libodfgen - 0.1.7
Ebuild name:

app-text/libodfgen-0.1.7

Description

Library to generate ODF documents from libwpd and libwpg

Added to portage

2018-11-16

mdds - 1.4.3
Ebuild name:

dev-util/mdds-1.4.3

Description

A collection of multi-dimensional data structure and indexing algorithm

Added to portage

2018-11-16

metalog - 20181125
Ebuild name:

app-admin/metalog-20181125

Description

A highly configurable replacement for syslogd/klogd

Added to portage

2018-11-16

mpd - 0.21.3
Ebuild name:

media-sound/mpd-0.21.3

Description

The Music Player Daemon (mpd)

Added to portage

2018-11-16

samba - 4.9.2-r1
Ebuild name:

net-fs/samba-4.9.2-r1

Description

Samba Suite Version 4

Added to portage

2018-11-16

serverengine - 2.1.0
Ebuild name:

dev-ruby/serverengine-2.1.0

Description

A framework to implement robust multiprocess servers

Added to portage

2018-11-16

systemrescuecd-x86 - 5.3.2
Ebuild name:

app-admin/systemrescuecd-x86-5.3.2

Description

The .iso image of SystemRescueCD rescue disk, x86 (+ amd64) vari

Added to portage

2018-11-16

vault - 0.11.5
Ebuild name:

app-admin/vault-0.11.5

Description

A tool for managing secrets

Added to portage

2018-11-16

warden - 1.2.8
Ebuild name:

dev-ruby/warden-1.2.8

Description

General Rack Authentication Framework

Added to portage

2018-11-16

wireguard - 0.0.20181115
Ebuild name:

net-vpn/wireguard-0.0.20181115

Description

Simple yet fast and modern VPN that utilizes state-of-the-art crypto

Added to portage

2018-11-16

xmlsec - 1.2.27
Ebuild name:

dev-libs/xmlsec-1.2.27

Description

Command line tool for signing, verifying, encrypting and decrypting XML

Added to portage

2018-11-16

2018-11-15
bashdb - 4.4.1.0.0
Ebuild name:

app-shells/bashdb-4.4.1.0.0

Description

bash source code debugging

Added to portage

2018-11-15

checkbashisms - 2.18.9
Ebuild name:

dev-util/checkbashisms-2.18.9

Description

Perl script to check for commonly used bash features not defined by P

Added to portage

2018-11-15

chronograf - 1.7.3
Ebuild name:

net-analyzer/chronograf-1.7.3

Description

Monitoring, processing and alerting on time series data

Added to portage

2018-11-15

ck-sources - 4.14.81
Ebuild name:

sys-kernel/ck-sources-4.14.81

Description

Gentoo's genpatches for Linux ., with Con Kolivas' MuQSS process sche

Added to portage

2018-11-15

ck-sources - 4.18.19
Ebuild name:

sys-kernel/ck-sources-4.18.19

Description

Gentoo's genpatches for Linux ., with Con Kolivas' MuQSS process sche

Added to portage

2018-11-15

ck-sources - 4.19.2
Ebuild name:

sys-kernel/ck-sources-4.19.2

Description

Gentoo's genpatches for Linux ., with Con Kolivas' MuQSS process sched

Added to portage

2018-11-15

ck-sources - 4.9.137
Ebuild name:

sys-kernel/ck-sources-4.9.137

Description

Gentoo's genpatches for Linux ., with Con Kolivas' MuQSS process sche

Added to portage

2018-11-15

conky - 1.10.8-r4
Ebuild name:

app-admin/conky-1.10.8-r4

Description

An advanced, highly configurable system monitor for X

Added to portage

2018-11-15

cuneiform - 1.1.0-r3
Ebuild name:

app-text/cuneiform-1.1.0-r3

Description

An enterprise quality OCR engine by Cognitive Technologies

Added to portage

2018-11-15

davix - 0.7.1
Ebuild name:

net-libs/davix-0.7.1

Description

High-performance file management over WebDAV/HTTP

Added to portage

2018-11-15

grpc - 1.16.1
Ebuild name:

net-libs/grpc-1.16.1

Description

Modern open source high performance RPC framework

Added to portage

2018-11-15

grpcio - 1.16.1
Ebuild name:

dev-python/grpcio-1.16.1

Description

High-performance RPC framework (python libraries)

Added to portage

2018-11-15

grpcio-testing - 1.16.1
Ebuild name:

dev-python/grpcio-testing-1.16.1

Description

Testing utilities for gRPC Python

Added to portage

2018-11-15

grpcio-tools - 1.16.1
Ebuild name:

dev-python/grpcio-tools-1.16.1

Description

Protobuf code generator for gRPC

Added to portage

2018-11-15

grs - 0.7
Ebuild name:

app-portage/grs-0.7

Description

Suite to build Gentoo Reference Systems

Added to portage

2018-11-15

httparty - 0.16.3
Ebuild name:

dev-ruby/httparty-0.16.3

Description

Makes http fun Also, makes consuming restful web services dead easy

Added to portage

2018-11-15

img - 0.5.4
Ebuild name:

app-emulation/img-0.5.4

Description

Standalone daemon-less unprivileged Dockerfile and OCI container image buil

Added to portage

2018-11-15

keepalived - 2.0.10-r1
Ebuild name:

sys-cluster/keepalived-2.0.10-r1

Description

A strong & robust keepalive facility to the Linux Virtual Server p

Added to portage

2018-11-15

kodi-audioencoder-flac - 1.1.0-r1
Ebuild name:

media-plugins/kodi-audioencoder-flac-1.1.0-r1

Description

Flac encoder addon for Kodi

Added to portage

2018-11-15

kodi-audioencoder-flac - 2.0.1
Ebuild name:

media-plugins/kodi-audioencoder-flac-2.0.1

Description

Flac encoder addon for Kodi

Added to portage

2018-11-15

kodi-audioencoder-vorbis - 1.1.0-r1
Ebuild name:

media-plugins/kodi-audioencoder-vorbis-1.1.0-r1

Description

Vorbis encoder addon for Kodi

Added to portage

2018-11-15

kodi-audioencoder-vorbis - 2.0.1
Ebuild name:

media-plugins/kodi-audioencoder-vorbis-2.0.1

Description

Vorbis encoder addon for Kodi

Added to portage

2018-11-15

kodi-inputstream-adaptive - 2.3.9
Ebuild name:

media-plugins/kodi-inputstream-adaptive-2.3.9

Description

Kodi's Adaptive inputstream addon

Added to portage

2018-11-15

kodi-pvr-dvbviewer - 3.7.5
Ebuild name:

media-plugins/kodi-pvr-dvbviewer-3.7.5

Description

Kodi's DVBViewer client addon

Added to portage

2018-11-15

kodi-pvr-wmc - 2.4.1
Ebuild name:

media-plugins/kodi-pvr-wmc-2.4.1

Description

Kodi's Windows Media Center client addon

Added to portage

2018-11-15

kodi-visualization-goom - 1.1.0-r1
Ebuild name:

media-plugins/kodi-visualization-goom-1.1.0-r1

Description

Goom visualizer for Kodi

Added to portage

2018-11-15

libadalang - 2017-r1
Ebuild name:

dev-ada/libadalang-2017-r1

Description

high performance semantic engine for the Ada programming language

Added to portage

2018-11-15

liboauth - 1.0.3-r1
Ebuild name:

net-libs/liboauth-1.0.3-r1

Description

C library implementing the OAuth secure authentication protocol

Added to portage

2018-11-15

mesa - 18.2.5
Ebuild name:

media-libs/mesa-18.2.5

Description

OpenGL-like graphic library for Linux

Added to portage

2018-11-15

minio - 2018.11.15.01.26.07
Ebuild name:

net-fs/minio-2018.11.15.01.26.07

Description

An Amazon S3 compatible object storage server

Added to portage

2018-11-15

nfs4-acl-tools - 0.3.5
Ebuild name:

net-fs/nfs4-acl-tools-0.3.5

Description

Commandline and GUI tools that deal directly with NFSv4 ACLs

Added to portage

2018-11-15

percona-server - 5.7.23.24
Ebuild name:

dev-db/percona-server-5.7.23.24

Description

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

Added to portage

2018-11-15

phpsysinfo - 3.2.10-r1
Ebuild name:

www-apps/phpsysinfo-3.2.10-r1

Description

A customizable PHP script that displays information about your system

Added to portage

2018-11-15

pyTenable - 0.3.0
Ebuild name:

dev-python/pyTenable-0.3.0

Description

Tenable API Library for Tenable.io and SecurityCenter

Added to portage

2018-11-15

reg - 0.16.0
Ebuild name:

app-emulation/reg-0.16.0

Description

Docker registry v2 command line client

Added to portage

2018-11-15

regexp_parser - 1.3.0
Ebuild name:

dev-ruby/regexp_parser-1.3.0

Description

A library for tokenizing, lexing, and parsing Ruby regular expressions

Added to portage

2018-11-15

rust - 1.29.1-r1
Ebuild name:

dev-lang/rust-1.29.1-r1

Description

Systems programming language from Mozilla

Added to portage

2018-11-15

rust - 1.29.2-r1
Ebuild name:

dev-lang/rust-1.29.2-r1

Description

Systems programming language from Mozilla

Added to portage

2018-11-15

rust - 1.30.1-r1
Ebuild name:

dev-lang/rust-1.30.1-r1

Description

Systems programming language from Mozilla

Added to portage

2018-11-15

rust-bin - 1.29.1-r1
Ebuild name:

dev-lang/rust-bin-1.29.1-r1

Description

Systems programming language from Mozilla

Added to portage

2018-11-15

rust-bin - 1.29.2-r1
Ebuild name:

dev-lang/rust-bin-1.29.2-r1

Description

Systems programming language from Mozilla

Added to portage

2018-11-15

rust-bin - 1.30.1-r1
Ebuild name:

dev-lang/rust-bin-1.30.1-r1

Description

Systems programming language from Mozilla

Added to portage

2018-11-15

thunderbird - 60.3.1
Ebuild name:

mail-client/thunderbird-60.3.1

Description

Thunderbird Mail Client

Added to portage

2018-11-15

thunderbird-bin - 60.3.1
Ebuild name:

mail-client/thunderbird-bin-60.3.1

Description

Thunderbird Mail Client

Added to portage

2018-11-15

vc - 1.4.0
Ebuild name:

dev-libs/vc-1.4.0

Description

SIMD Vector Class Library for C++

Added to portage

2018-11-15

vobject - 0.9.6.1
Ebuild name:

dev-python/vobject-0.9.6.1

Description

Python package for parsing and generating vCard and vCalendar files

Added to portage

2018-11-15

yarn - 1.12.3
Ebuild name:

sys-apps/yarn-1.12.3

Description

Fast, reliable, and secure node dependency management

Added to portage

2018-11-15

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