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:

83842

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->VI

4. Startup File


Having explored vi commands somewhat, we are now ready to create
a default editing environment through the use of .exrc,
the configuration file which resides in user's home directory.


.exrc typically contains at least three types of entries:



  1. set commands to create preferred editing environment
  2. map commands to assign functions or macros to keys
  3. ab commands to either map abbreviations or automatically
    correct common spelling errors

When mapping escape sequences of some keys, we may need to
quote them, that is, to insert them literally. This can
be accomplished in vi by issuing a text input command and pressing
Ctrl-V before the key we wish to quote is pressed.


Now let's look at a sample .exrc:



set autoindent
set wrapmargin=8
set ignorecase
map #4 !}fmt^M
ab teh the
ab cutsomer customer

Lines 1 and 2 set autoindent mode on and turn on wordwrap at column
72. Line 3 specifies that all searches are to be case insensitive.
Line 4 maps function key 4 to reformat from the cursor position
to the end of the paragraph
. Finally, lines 5 and 6 map some
common misspellings to the correct spelling. Note that ^M
on lines 4 and 5 are created by pressing Ctrl-V and then
hitting Ctrl-M.


With a little creativity you can make vi look as personal as you wish.


NOTE: After creating .exrc make sure that EXINIT
environment variable is not set as it would overwrite whatever
settings you entered into .exrc. You can verify whether
the EXINIT variable is set using this command from the UNIX command
prompt:



$ set | grep EXINIT

If you see no output, you're fine.


Make sure that .exrc contains no blank lines - they
are not allowed.



/* The article above and any accompanying files are freely
* distributable, but please leave this notice and the text intact.
* Home for this document: http://www.infobound.com/vi.html
* Copyright (C) 1994, 1999 Tony Thomas
* Contact author through email:
tony@infobound.com
* Last revision Feb 23, 1999
* UNIX is a trademark of X/Open
*/


rate this article:
current rating: average rating: 1.1 (40 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
2026-03-20
chibi - 0.12
Ebuild name:

dev-scheme/chibi-0.12

Description

Minimal Scheme implementation for use as an extension language

Added to portage

2026-03-20

coreutils - 9.9-r12
Ebuild name:

sys-apps/coreutils-9.9-r12

Description

Standard GNU utilities (chmod, cp, dd, ls, sort, tr, head, wc, who,...)

Added to portage

2026-03-20

gallery-dl - 1.31.10
Ebuild name:

net-misc/gallery-dl-1.31.10

Description

Download image galleries and collections from several image hosting sit

Added to portage

2026-03-20

jingoo - 1.5.2
Ebuild name:

dev-ml/jingoo-1.5.2

Description

OCaml template engine almost compatible with Jinja2

Added to portage

2026-03-20

keychain - 2.9.8
Ebuild name:

net-misc/keychain-2.9.8

Description

Agent manager for OpenSSH, ssh.com, Sun SSH, and GnuPG

Added to portage

2026-03-20

mpc - 1.4.0
Ebuild name:

dev-libs/mpc-1.4.0

Description

A library for multiprecision complex arithmetic with exact rounding

Added to portage

2026-03-20

pandoc-bin - 3.9.0.2
Ebuild name:

app-text/pandoc-bin-3.9.0.2

Description

Conversion between markup formats (binary package)

Added to portage

2026-03-20

pwsh - 7.6
Ebuild name:

virtual/pwsh-7.6

Description

Virtual for PowerShell

Added to portage

2026-03-20

pwsh - 7.6.0
Ebuild name:

app-shells/pwsh-7.6.0

Description

Cross-platform automation and configuration tool

Added to portage

2026-03-20

pwsh-bin - 7.6.0
Ebuild name:

app-shells/pwsh-bin-7.6.0

Description

Cross-platform automation and configuration tool (binary package)

Added to portage

2026-03-20

shell-maker - 0.89.2
Ebuild name:

app-emacs/shell-maker-0.89.2

Description

Interaction mode for making comint shells for GNU Emacs

Added to portage

2026-03-20

unifi - 10.1.89
Ebuild name:

net-wireless/unifi-10.1.89

Description

A Management Controller for Ubiquiti Networks UniFi APs

Added to portage

2026-03-20

vivaldi - 7.9.3970.39
Ebuild name:

www-client/vivaldi-7.9.3970.39

Description

A browser for our friends

Added to portage

2026-03-20

2026-03-19
R - 4.5.3
Ebuild name:

dev-lang/R-4.5.3

Description

Language and environment for statistical computing and graphics

Added to portage

2026-03-19

accel-ppp - 1.14.0
Ebuild name:

net-dialup/accel-ppp-1.14.0

Description

High performance PPTP/L2TP/SSTP/PPPoE/IPoE server

Added to portage

2026-03-19

anthy-unicode - 1.0.0.20260213
Ebuild name:

app-i18n/anthy-unicode-1.0.0.20260213

Description

Another Anthy - Japanese character set input library for Unic

Added to portage

2026-03-19

async-lru - 2.3.0
Ebuild name:

dev-python/async-lru-2.3.0

Description

Simple lru_cache for asyncio

Added to portage

2026-03-19

aws-session-manager-plugin - 1.2.792.0
Ebuild name:

app-admin/aws-session-manager-plugin-1.2.792.0

Description

AWS Session Manager Plugin for aws-cli

Added to portage

2026-03-19

awscli - 1.44.61
Ebuild name:

app-admin/awscli-1.44.61

Description

Universal Command Line Environment for AWS

Added to portage

2026-03-19

boto3 - 1.42.71
Ebuild name:

dev-python/boto3-1.42.71

Description

The AWS SDK for Python

Added to portage

2026-03-19

botocore - 1.42.71
Ebuild name:

dev-python/botocore-1.42.71

Description

Low-level, data-driven core of boto 3

Added to portage

2026-03-19

btrfs-progs - 6.19.1
Ebuild name:

sys-fs/btrfs-progs-6.19.1

Description

Btrfs filesystem utilities

Added to portage

2026-03-19

btrfsutil - 6.19.1
Ebuild name:

dev-python/btrfsutil-6.19.1

Description

Library for managing Btrfs filesystems

Added to portage

2026-03-19

cdk - 5.0.20260119
Ebuild name:

dev-libs/cdk-5.0.20260119

Description

A library of curses widgets

Added to portage

2026-03-19

crossdev - 20260318
Ebuild name:

sys-devel/crossdev-20260318

Description

Gentoo Cross-toolchain generator

Added to portage

2026-03-19

davfs2 - 1.7.3
Ebuild name:

net-fs/davfs2-1.7.3

Description

Linux FUSE (or coda) driver that allows you to mount a WebDAV resource

Added to portage

2026-03-19

deepdiff - 8.6.2
Ebuild name:

dev-python/deepdiff-8.6.2

Description

A library for comparing dictionaries, iterables, strings and other object

Added to portage

2026-03-19

dhcpcd - 10.3.1
Ebuild name:

net-misc/dhcpcd-10.3.1

Description

A fully featured, yet light weight RFC2131 compliant DHCP client

Added to portage

2026-03-19

djangorestframework - 3.17.0
Ebuild name:

dev-python/djangorestframework-3.17.0

Description

Web APIs with django made easy

Added to portage

2026-03-19

eduvpn-client - 4.7.1
Ebuild name:

net-vpn/eduvpn-client-4.7.1

Description

Linux client and Python client API for eduVPN

Added to portage

2026-03-19

eduvpn-common - 5.0.1
Ebuild name:

net-vpn/eduvpn-common-5.0.1

Description

Linux client and Python client API for eduVPN

Added to portage

2026-03-19

elfutils - 0.194-r2
Ebuild name:

dev-libs/elfutils-0.194-r2

Description

Libraries/utilities to handle ELF objects (drop in replacement for libel

Added to portage

2026-03-19

fcitx-anthy - 5.1.10
Ebuild name:

app-i18n/fcitx-anthy-5.1.10

Description

Japanese Anthy input methods for Fcitx5

Added to portage

2026-03-19

flashrom - 1.7.0
Ebuild name:

sys-apps/flashrom-1.7.0

Description

Utility for reading, writing, erasing and verifying flash ROM chips

Added to portage

2026-03-19

freerdp - 3.24.1
Ebuild name:

net-misc/freerdp-3.24.1

Description

Free implementation of the Remote Desktop Protocol

Added to portage

2026-03-19

gst-plugins-base - 1.24.13-r1
Ebuild name:

media-libs/gst-plugins-base-1.24.13-r1

Description

Basepack of plugins for gstreamer

Added to portage

2026-03-19

gst-plugins-good - 1.24.13-r1
Ebuild name:

media-libs/gst-plugins-good-1.24.13-r1

Description

Basepack of plugins for GStreamer

Added to portage

2026-03-19

gst-plugins-ugly - 1.24.13-r1
Ebuild name:

media-libs/gst-plugins-ugly-1.24.13-r1

Description

Basepack of plugins for gstreamer

Added to portage

2026-03-19

haproxy - 3.3.6
Ebuild name:

net-proxy/haproxy-3.3.6

Description

A TCP/HTTP reverse proxy for high availability environments

Added to portage

2026-03-19

hello - 2.12.3
Ebuild name:

app-misc/hello-2.12.3

Description

GNU

Added to portage

2026-03-19

ibus-anthy - 1.5.18
Ebuild name:

app-i18n/ibus-anthy-1.5.18

Description

Japanese Anthy engine for IBus

Added to portage

2026-03-19

icu - 78.3
Ebuild name:

dev-libs/icu-78.3

Description

International Components for Unicode

Added to portage

2026-03-19

jaxb-api - 4.0.5
Ebuild name:

dev-java/jaxb-api-4.0.5

Description

Jakarta XML Binding API

Added to portage

2026-03-19

libtorrent - 0.16.8
Ebuild name:

net-libs/libtorrent-0.16.8

Description

BitTorrent library written in C++ for *nix

Added to portage

2026-03-19

libxml2 - 2.15.2-r1
Ebuild name:

dev-libs/libxml2-2.15.2-r1

Description

XML C parser and toolkit

Added to portage

2026-03-19

lowdown - 3.0.1
Ebuild name:

app-text/lowdown-3.0.1

Description

Markdown translator producing HTML5, roff documents in the ms and man format

Added to portage

2026-03-19

lzip - 1.26
Ebuild name:

app-arch/lzip-1.26

Description

Lossless data compressor based on the LZMA algorithm

Added to portage

2026-03-19

m17n-lib - 1.8.6-r1
Ebuild name:

dev-libs/m17n-lib-1.8.6-r1

Description

Multilingual Library for Unix/Linux

Added to portage

2026-03-19

meson - 1.10.2
Ebuild name:

dev-build/meson-1.10.2

Description

Open source build system

Added to portage

2026-03-19

mpd - 0.24.9
Ebuild name:

media-sound/mpd-0.24.9

Description

The Music Player Daemon (mpd)

Added to portage

2026-03-19

mrouted - 4.6-r1
Ebuild name:

net-misc/mrouted-4.6-r1

Description

IP multicast routing daemon

Added to portage

2026-03-19

multiple-cursors - 1.5.0
Ebuild name:

app-emacs/multiple-cursors-1.5.0

Description

Multiple cursors for Emacs

Added to portage

2026-03-19

muse - 3.20.2
Ebuild name:

app-emacs/muse-3.20.2

Description

An authoring and publishing environment for Emacs

Added to portage

2026-03-19

musl-locales - 0.1.0-r3
Ebuild name:

sys-apps/musl-locales-0.1.0-r3

Description

Locale program for musl libc

Added to portage

2026-03-19

mycli - 1.65.0
Ebuild name:

dev-db/mycli-1.65.0

Description

CLI for MySQL Database with auto-completion and syntax highlighting

Added to portage

2026-03-19

nagios-mode - 0.4
Ebuild name:

app-emacs/nagios-mode-0.4

Description

Major mode for editing Nagios configuration files

Added to portage

2026-03-19

nsd - 4.14.2
Ebuild name:

net-dns/nsd-4.14.2

Description

An authoritative only, high performance, open source name server

Added to portage

2026-03-19

nuitka - 4.0.6
Ebuild name:

dev-python/nuitka-4.0.6

Description

Python to native compiler

Added to portage

2026-03-19

nvtop - 3.3.2
Ebuild name:

sys-process/nvtop-3.3.2

Description

(h)top like task monitor for AMD, NVIDIA, Intel and other GPUs

Added to portage

2026-03-19

openjdk-bin - 27_alpha13
Ebuild name:

dev-java/openjdk-bin-27_alpha13

Description

Prebuilt Java JDK binaries provided by Eclipse Temurin

Added to portage

2026-03-19

openldap - 2.6.13
Ebuild name:

net-nds/openldap-2.6.13

Description

LDAP suite of application and development tools

Added to portage

2026-03-19

openpgp-keys-alekseysanin - 20231021
Ebuild name:

sec-keys/openpgp-keys-alekseysanin-20231021

Description

Aleksey Sanin OpenPGP Key

Added to portage

2026-03-19

openpgp-keys-alisarctl - 20200302
Ebuild name:

sec-keys/openpgp-keys-alisarctl-20200302

Description

OpenPGP keys used by Ali Abdallah

Added to portage

2026-03-19

patchutils - 0.4.5-r1
Ebuild name:

dev-util/patchutils-0.4.5-r1

Description

Collection of tools that operate on patch files

Added to portage

2026-03-19

pcf2bdf - 1.07
Ebuild name:

media-fonts/pcf2bdf-1.07

Description

Converts PCF fonts to BDF fonts

Added to portage

2026-03-19

pikepdf - 10.5.1
Ebuild name:

dev-python/pikepdf-10.5.1

Description

Python library to work with pdf files based on qpdf

Added to portage

2026-03-19

plan9port - 0_pre20260226
Ebuild name:

dev-util/plan9port-0_pre20260226

Description

Port of many Plan 9 programs and libraries

Added to portage

2026-03-19

poppler - 26.03.0
Ebuild name:

app-text/poppler-26.03.0

Description

PDF rendering library based on the xpdf-3.0 code base

Added to portage

2026-03-19

protobuf - 6.33.6
Ebuild name:

dev-python/protobuf-6.33.6

Description

Google's Protocol Buffers - Python bindings

Added to portage

2026-03-19

pyfakefs - 6.1.6
Ebuild name:

dev-python/pyfakefs-6.1.6

Description

A fake file system that mocks the Python file system modules

Added to portage

2026-03-19

pyproject-fmt - 2.20.0
Ebuild name:

dev-python/pyproject-fmt-2.20.0

Description

Format your pyproject.toml file

Added to portage

2026-03-19

python-discovery - 1.2.0
Ebuild name:

dev-python/python-discovery-1.2.0

Description

Python interpreter discovery

Added to portage

2026-03-19

pythonfinder - 3.0.2
Ebuild name:

dev-python/pythonfinder-3.0.2

Description

PythonFinder Cross Platform Search Tool for Finding Pythons

Added to portage

2026-03-19

pyxdameraulevenshtein - 1.10.0
Ebuild name:

dev-python/pyxdameraulevenshtein-1.10.0

Description

Implements the Damerau-Levenshtein edit distance algorithm

Added to portage

2026-03-19

pyzotero - 1.11.0
Ebuild name:

dev-python/pyzotero-1.11.0

Description

A Python client for the Zotero API

Added to portage

2026-03-19

qlog - 0.49.0
Ebuild name:

media-radio/qlog-0.49.0

Description

Amateur radio logbook software

Added to portage

2026-03-19

root - 6.38.04
Ebuild name:

sci-physics/root-6.38.04

Description

C++ data analysis framework and interpreter from CERN

Added to portage

2026-03-19

roundcube - 1.6.14
Ebuild name:

mail-client/roundcube-1.6.14

Description

Browser-based multilingual IMAP client with an application-like user i

Added to portage

2026-03-19

roundcube - 1.7_rc5
Ebuild name:

mail-client/roundcube-1.7_rc5

Description

A browser-based multilingual IMAP client with an application-like use

Added to portage

2026-03-19

rtorrent - 0.16.8
Ebuild name:

net-p2p/rtorrent-0.16.8

Description

BitTorrent Client using libtorrent

Added to portage

2026-03-19

runit - 2.2.0-r3
Ebuild name:

sys-process/runit-2.2.0-r3

Description

A UNIX init scheme with service supervision

Added to portage

2026-03-19

s6-rc - 0.5.6.0-r1
Ebuild name:

sys-apps/s6-rc-0.5.6.0-r1

Description

Service manager for the s6 supervision suite

Added to portage

2026-03-19

s6-rc - 0.6.0.0-r1
Ebuild name:

sys-apps/s6-rc-0.6.0.0-r1

Description

Service manager for the s6 supervision suite

Added to portage

2026-03-19

scim-anthy - 1.4.0
Ebuild name:

app-i18n/scim-anthy-1.4.0

Description

Japanese input method Anthy IMEngine for SCIM

Added to portage

2026-03-19

service-manager - 2-r1
Ebuild name:

virtual/service-manager-2-r1

Description

Virtual for various service managers

Added to portage

2026-03-19

simh - 3.12.5
Ebuild name:

app-emulation/simh-3.12.5

Description

a simulator for historical computers such as Vax, PDP-11 etc.

Added to portage

2026-03-19

sonarr-bin - 4.0.17.2952
Ebuild name:

www-apps/sonarr-bin-4.0.17.2952

Description

Sonarr is a Smart PVR for newsgroup and bittorrent users

Added to portage

2026-03-19

tmpfiles - 0-r6
Ebuild name:

virtual/tmpfiles-0-r6

Description

Virtual to select between different tmpfiles.d handlers

Added to portage

2026-03-19

trimesh - 4.11.4
Ebuild name:

dev-python/trimesh-4.11.4

Description

Python library for loading and using triangular meshes

Added to portage

2026-03-19

uim - 1.9.6
Ebuild name:

app-i18n/uim-1.9.6

Description

Multilingual input method framework

Added to portage

2026-03-19

vagrant - 2.4.9
Ebuild name:

app-emulation/vagrant-2.4.9

Description

A tool for building and distributing development environments

Added to portage

2026-03-19

vanilla-sources - 6.18.19
Ebuild name:

sys-kernel/vanilla-sources-6.18.19

Description

Full sources for the Linux kernel

Added to portage

2026-03-19

vanilla-sources - 6.19.9
Ebuild name:

sys-kernel/vanilla-sources-6.19.9

Description

Full sources for the Linux kernel

Added to portage

2026-03-19

varnish - 8.0.1
Ebuild name:

www-servers/varnish-8.0.1

Description

Varnish is a state-of-the-art, high-performance HTTP accelerator

Added to portage

2026-03-19

xfsprogs - 6.19.0
Ebuild name:

sys-fs/xfsprogs-6.19.0

Description

XFS filesystem utilities

Added to portage

2026-03-19

xmlsec - 1.3.9
Ebuild name:

dev-libs/xmlsec-1.3.9

Description

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

Added to portage

2026-03-19

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