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:

61756

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



Support us on Content Nation

New Packages

- as rdf newsfeed
- as rss newsfeed
- as Atom newsfeed
2022-08-12
balloonchase - 0.9.6-r2
Ebuild name:

games-arcade/balloonchase-0.9.6-r2

Description

Fly a hot air balloon and try to blow the other player out of th

Added to portage

2022-08-12

cob - 0.9-r2
Ebuild name:

games-arcade/cob-0.9-r2

Description

Cruising on Broadway a painting-type game

Added to portage

2022-08-12

conveysdl - 1.3-r2
Ebuild name:

games-arcade/conveysdl-1.3-r2

Description

Guide the blob along the conveyer belt collecting the red blobs

Added to portage

2022-08-12

criticalmass - 1.0.2-r2
Ebuild name:

games-arcade/criticalmass-1.0.2-r2

Description

SDL/OpenGL space shoot'em up game

Added to portage

2022-08-12

dist-kernel - 5.10.136
Ebuild name:

virtual/dist-kernel-5.10.136

Description

Virtual to depend on any Distribution Kernel

Added to portage

2022-08-12

dist-kernel - 5.4.210
Ebuild name:

virtual/dist-kernel-5.4.210

Description

Virtual to depend on any Distribution Kernel

Added to portage

2022-08-12

f - 0.20.0-r1
Ebuild name:

app-emacs/f-0.20.0-r1

Description

Modern API for working with files and directories in Emacs

Added to portage

2022-08-12

gentoo-kernel - 5.10.136
Ebuild name:

sys-kernel/gentoo-kernel-5.10.136

Description

Linux kernel built with Gentoo patches

Added to portage

2022-08-12

gentoo-kernel - 5.4.210
Ebuild name:

sys-kernel/gentoo-kernel-5.4.210

Description

Linux kernel built with Gentoo patches

Added to portage

2022-08-12

gentoo-kernel-bin - 5.10.136
Ebuild name:

sys-kernel/gentoo-kernel-bin-5.10.136

Description

Pre-built Linux kernel with Gentoo patches

Added to portage

2022-08-12

gentoo-kernel-bin - 5.4.210
Ebuild name:

sys-kernel/gentoo-kernel-bin-5.4.210

Description

Pre-built Linux kernel with Gentoo patches

Added to portage

2022-08-12

netdata - 1.36.0
Ebuild name:

net-analyzer/netdata-1.36.0

Description

Linux real time system monitoring, done right

Added to portage

2022-08-12

networkmanager - 1.38.4
Ebuild name:

net-misc/networkmanager-1.38.4

Description

A set of co-operative tools that make networking simple and straight

Added to portage

2022-08-12

uptimed - 0.4.6-r1
Ebuild name:

app-misc/uptimed-0.4.6-r1

Description

System uptime record daemon that keeps track of your highest uptimes

Added to portage

2022-08-12

vanilla-kernel - 5.10.136
Ebuild name:

sys-kernel/vanilla-kernel-5.10.136

Description

Linux kernel built from vanilla upstream sources

Added to portage

2022-08-12

vanilla-kernel - 5.4.210
Ebuild name:

sys-kernel/vanilla-kernel-5.4.210

Description

Linux kernel built from vanilla upstream sources

Added to portage

2022-08-12

vivaldi - 5.4.2753.28
Ebuild name:

www-client/vivaldi-5.4.2753.28

Description

A browser for our friends

Added to portage

2022-08-12

vivaldi-snapshot - 5.4.2753.27
Ebuild name:

www-client/vivaldi-snapshot-5.4.2753.27

Description

A browser for our friends

Added to portage

2022-08-12

vkd3d - 1.4
Ebuild name:

app-emulation/vkd3d-1.4

Description

D3D12 to Vulkan translation library

Added to portage

2022-08-12

xorg-proto - 2022.2
Ebuild name:

x11-base/xorg-proto-2022.2

Description

X.Org combined protocol headers

Added to portage

2022-08-12

2022-08-11
appstream-glib - 0.8.1
Ebuild name:

dev-libs/appstream-glib-0.8.1

Description

Provides GObjects and helper methods to read and write AppStream meta

Added to portage

2022-08-11

asttokens - 2.0.7
Ebuild name:

dev-python/asttokens-2.0.7

Description

Annotate Python AST trees with source text and token information

Added to portage

2022-08-11

awscli - 1.25.49
Ebuild name:

app-admin/awscli-1.25.49

Description

Universal Command Line Environment for AWS

Added to portage

2022-08-11

bacula - 13.0.1
Ebuild name:

app-backup/bacula-13.0.1

Description

Featureful client/server network backup suite

Added to portage

2022-08-11

bcc - 0.25.0
Ebuild name:

dev-util/bcc-0.25.0

Description

Tools for BPF-based Linux IO analysis, networking, monitoring, and more

Added to portage

2022-08-11

bedrock-server - 1.19.20.02
Ebuild name:

games-server/bedrock-server-1.19.20.02

Description

The official bedrock (non-java) based server for the sandbox

Added to portage

2022-08-11

blender - 2.93.10
Ebuild name:

media-gfx/blender-2.93.10

Description

3D Creation/Animation/Publishing System

Added to portage

2022-08-11

blender - 3.2.2
Ebuild name:

media-gfx/blender-3.2.2

Description

3D Creation/Animation/Publishing System

Added to portage

2022-08-11

boto3 - 1.24.49
Ebuild name:

dev-python/boto3-1.24.49

Description

The AWS SDK for Python

Added to portage

2022-08-11

botocore - 1.27.49
Ebuild name:

dev-python/botocore-1.27.49

Description

Low-level, data-driven core of boto 3

Added to portage

2022-08-11

bundler-audit - 0.9.1
Ebuild name:

dev-ruby/bundler-audit-0.9.1

Description

Provides patch-level verification for Bundled apps

Added to portage

2022-08-11

ceph - 15.2.17
Ebuild name:

sys-cluster/ceph-15.2.17

Description

Ceph distributed filesystem

Added to portage

2022-08-11

chrony - 4.3_pre1
Ebuild name:

net-misc/chrony-4.3_pre1

Description

NTP client and server programs

Added to portage

2022-08-11

cups-pk-helper - 0.2.7
Ebuild name:

net-print/cups-pk-helper-0.2.7

Description

PolicyKit helper to configure cups with fine-grained privileges

Added to portage

2022-08-11

ddt - 1.6.0
Ebuild name:

dev-python/ddt-1.6.0

Description

Data-Driven/Decorated Tests

Added to portage

2022-08-11

discord-bin - 0.0.19
Ebuild name:

net-im/discord-bin-0.0.19

Description

All-in-one voice and text chat for gamers

Added to portage

2022-08-11

egl-wayland - 1.1.10_p20220805
Ebuild name:

gui-libs/egl-wayland-1.1.10_p20220805

Description

EGLStream-based Wayland external platform

Added to portage

2022-08-11

embree - 3.13.4
Ebuild name:

media-libs/embree-3.13.4

Description

Collection of high-performance ray tracing kernels

Added to portage

2022-08-11

ensurepip-wheels - 63.4.3.22.2.2
Ebuild name:

dev-python/ensurepip-wheels-63.4.3.22.2.2

Description

Shared wheels for ensurepip Python module

Added to portage

2022-08-11

fennel-mode - 0.4.1-r1
Ebuild name:

app-emacs/fennel-mode-0.4.1-r1

Description

Emacs support for the Fennel programming language

Added to portage

2022-08-11

fennel-mode - 0.5.0
Ebuild name:

app-emacs/fennel-mode-0.5.0

Description

Emacs support for the Fennel programming language

Added to portage

2022-08-11

filelock - 3.8.0
Ebuild name:

dev-python/filelock-3.8.0

Description

A platform independent file lock for Python

Added to portage

2022-08-11

gdk-pixbuf - 2.42.9
Ebuild name:

x11-libs/gdk-pixbuf-2.42.9

Description

Image loading library for GTK+

Added to portage

2022-08-11

gentoo-sources - 4.19.255
Ebuild name:

sys-kernel/gentoo-sources-4.19.255

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2022-08-11

gentoo-sources - 5.10.136
Ebuild name:

sys-kernel/gentoo-sources-5.10.136

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2022-08-11

gentoo-sources - 5.15.60
Ebuild name:

sys-kernel/gentoo-sources-5.15.60

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2022-08-11

gentoo-sources - 5.18.17
Ebuild name:

sys-kernel/gentoo-sources-5.18.17

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2022-08-11

gentoo-sources - 5.19.1
Ebuild name:

sys-kernel/gentoo-sources-5.19.1

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2022-08-11

gentoo-sources - 5.4.210
Ebuild name:

sys-kernel/gentoo-sources-5.4.210

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2022-08-11

glade - 3.40.0
Ebuild name:

dev-util/glade-3.40.0

Description

A user interface designer for GTK+ and GNOME

Added to portage

2022-08-11

gprof2dot - 2022.07.29
Ebuild name:

dev-util/gprof2dot-2022.07.29

Description

Converts profiling output to dot graphs

Added to portage

2022-08-11

guake - 3.8.5-r1
Ebuild name:

x11-terms/guake-3.8.5-r1

Description

Drop-down terminal for GNOME

Added to portage

2022-08-11

hypothesis - 6.54.2
Ebuild name:

dev-python/hypothesis-6.54.2

Description

A library for property based testing

Added to portage

2022-08-11

iwgtk - 0.8
Ebuild name:

net-wireless/iwgtk-0.8

Description

Lightweight, graphical wifi management utility for Linux

Added to portage

2022-08-11

jenkins-bin - 2.346.3
Ebuild name:

dev-util/jenkins-bin-2.346.3

Description

Extensible continuous integration server

Added to portage

2022-08-11

jenkins-bin - 2.363
Ebuild name:

dev-util/jenkins-bin-2.363

Description

Extensible continuous integration server

Added to portage

2022-08-11

matplotlib - 3.5.3
Ebuild name:

dev-python/matplotlib-3.5.3

Description

Pure python plotting library with matlab like syntax

Added to portage

2022-08-11

mesa - 22.1.6
Ebuild name:

media-libs/mesa-22.1.6

Description

OpenGL-like graphic library for Linux

Added to portage

2022-08-11

nauty - 2.7.4
Ebuild name:

sci-mathematics/nauty-2.7.4

Description

Computing automorphism groups of graphs and digraphs

Added to portage

2022-08-11

nbconvert - 6.5.2
Ebuild name:

dev-python/nbconvert-6.5.2

Description

Converting Jupyter Notebooks

Added to portage

2022-08-11

nuitka - 1.0.3
Ebuild name:

dev-python/nuitka-1.0.3

Description

Python to native compiler

Added to portage

2022-08-11

nvme-cli - 2.1.2
Ebuild name:

sys-apps/nvme-cli-2.1.2

Description

NVM-Express user space tooling for Linux

Added to portage

2022-08-11

pango - 1.50.9
Ebuild name:

x11-libs/pango-1.50.9

Description

Internationalized text layout and rendering library

Added to portage

2022-08-11

podman-py - 4.2.0
Ebuild name:

dev-python/podman-py-4.2.0

Description

A library to interact with a Podman server

Added to portage

2022-08-11

proto-plus - 1.22.0
Ebuild name:

dev-python/proto-plus-1.22.0

Description

Beautiful, Pythonic protocol buffers

Added to portage

2022-08-11

pyelftools - 0.29
Ebuild name:

dev-python/pyelftools-0.29

Description

pure-Python library for analyzing ELF files and DWARF debugging informat

Added to portage

2022-08-11

pyhamcrest - 2.0.4
Ebuild name:

dev-python/pyhamcrest-2.0.4

Description

Hamcrest framework for matcher objects

Added to portage

2022-08-11

pypy - 7.3.9-r1
Ebuild name:

dev-python/pypy-7.3.9-r1

Description

A fast, compliant alternative implementation of the Python language

Added to portage

2022-08-11

pyspnego - 0.5.4
Ebuild name:

dev-python/pyspnego-0.5.4

Description

Library to handle SPNEGO and CredSSP authentication

Added to portage

2022-08-11

setuptools - 63.4.3
Ebuild name:

dev-python/setuptools-63.4.3

Description

Collection of extensions to Distutils

Added to portage

2022-08-11

setuptools-rust - 1.5.0
Ebuild name:

dev-python/setuptools-rust-1.5.0

Description

A plugin for setuptools to build Rust Python extensions

Added to portage

2022-08-11

sphinx-basic-ng - 0.0.1_alpha12
Ebuild name:

dev-python/sphinx-basic-ng-0.0.1_alpha12

Description

A modern skeleton for Sphinx themes

Added to portage

2022-08-11

stratagus - 3.3.2
Ebuild name:

games-engines/stratagus-3.3.2

Description

A realtime strategy game engine

Added to portage

2022-08-11

tomlkit - 0.11.3
Ebuild name:

dev-python/tomlkit-0.11.3

Description

Style preserving TOML library

Added to portage

2022-08-11

trimesh - 3.13.1
Ebuild name:

dev-python/trimesh-3.13.1

Description

Python library for loading and using triangular meshes

Added to portage

2022-08-11

trove-classifiers - 2022.8.7
Ebuild name:

dev-python/trove-classifiers-2022.8.7

Description

Canonical source for classifiers on PyPI (pypi.org)

Added to portage

2022-08-11

vanilla-sources - 4.19.255
Ebuild name:

sys-kernel/vanilla-sources-4.19.255

Description

Full sources for the Linux kernel

Added to portage

2022-08-11

vanilla-sources - 5.10.136
Ebuild name:

sys-kernel/vanilla-sources-5.10.136

Description

Full sources for the Linux kernel

Added to portage

2022-08-11

vanilla-sources - 5.15.60
Ebuild name:

sys-kernel/vanilla-sources-5.15.60

Description

Full sources for the Linux kernel

Added to portage

2022-08-11

vanilla-sources - 5.18.17
Ebuild name:

sys-kernel/vanilla-sources-5.18.17

Description

Full sources for the Linux kernel

Added to portage

2022-08-11

vanilla-sources - 5.19.1
Ebuild name:

sys-kernel/vanilla-sources-5.19.1

Description

Full sources for the Linux kernel

Added to portage

2022-08-11

vanilla-sources - 5.4.210
Ebuild name:

sys-kernel/vanilla-sources-5.4.210

Description

Full sources for the Linux kernel

Added to portage

2022-08-11

war1gus - 3.3.2
Ebuild name:

games-strategy/war1gus-3.3.2

Description

Warcraft Orcs & Humans for the Stratagus game engine

Added to portage

2022-08-11

wargus - 3.3.2
Ebuild name:

games-strategy/wargus-3.3.2

Description

Warcraft II for the Stratagus game engine

Added to portage

2022-08-11

webmock - 3.17.1
Ebuild name:

dev-ruby/webmock-3.17.1

Description

Allows stubbing HTTP requests and setting expectations on HTTP requests

Added to portage

2022-08-11

wmctrl - 1.07-r3
Ebuild name:

x11-misc/wmctrl-1.07-r3

Description

Command line tool to interact with an EWMH/NetWM compatible X Window Manage

Added to portage

2022-08-11

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