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:

86344

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.2 (63 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-06-27
7zip - 26.02
Ebuild name:

app-arch/7zip-26.02

Description

Free file archiver for extremely high compression

Added to portage

2026-06-27

ast-serialize - 0.5.0
Ebuild name:

dev-python/ast-serialize-0.5.0

Description

Python bindings for mypy AST serialization

Added to portage

2026-06-27

buildah - 1.44.0-r1
Ebuild name:

app-containers/buildah-1.44.0-r1

Description

A tool that facilitates building OCI images

Added to portage

2026-06-27

c-blosc2 - 3.1.5
Ebuild name:

dev-libs/c-blosc2-3.1.5

Description

Blocking, shuffling and lossless compression library

Added to portage

2026-06-27

closure-compiler-bin - 20260622
Ebuild name:

dev-lang/closure-compiler-bin-20260622

Description

JavaScript optimizing compiler

Added to portage

2026-06-27

container-libs - 0.68.0
Ebuild name:

app-containers/container-libs-0.68.0

Description

Several utilities from the containers project

Added to portage

2026-06-27

docker-buildx - 0.35.0
Ebuild name:

app-containers/docker-buildx-0.35.0

Description

Docker CLI plugin for extended build capabilities with BuildKit

Added to portage

2026-06-27

editline - 2.0.0
Ebuild name:

dev-libs/editline-2.0.0

Description

line editing library for UNIX call compatible with the FSF readline

Added to portage

2026-06-27

edk2 - 202605
Ebuild name:

sys-firmware/edk2-202605

Description

TianoCore EDK II UEFI firmware for virtual machines

Added to portage

2026-06-27

edk2-bin - 202605
Ebuild name:

sys-firmware/edk2-bin-202605

Description

TianoCore EDK II UEFI firmware for virtual machines

Added to portage

2026-06-27

eisl - 5.67
Ebuild name:

dev-lang/eisl-5.67

Description

Interpreter and compiler compatible with the ISLisp standard

Added to portage

2026-06-27

fastapi - 0.138.1
Ebuild name:

dev-python/fastapi-0.138.1

Description

High performance framework, easy to learn, fast to code, ready for produ

Added to portage

2026-06-27

firefox - 152.0.3
Ebuild name:

www-client/firefox-152.0.3

Description

Firefox Web Browser

Added to portage

2026-06-27

firefox-bin - 152.0.3
Ebuild name:

www-client/firefox-bin-152.0.3

Description

Firefox Web Browser

Added to portage

2026-06-27

firefox-l10n - 152.0.3
Ebuild name:

www-client/firefox-l10n-152.0.3

Description

Firefox Web Browser's translation files

Added to portage

2026-06-27

fuzzylite - 6.0
Ebuild name:

dev-libs/fuzzylite-6.0

Description

A fuzzy logic control library in C++

Added to portage

2026-06-27

greenlet - 3.5.3
Ebuild name:

dev-python/greenlet-3.5.3

Description

Lightweight in-process concurrent programming

Added to portage

2026-06-27

httplib2 - 0.32.0
Ebuild name:

dev-python/httplib2-0.32.0

Description

A comprehensive HTTP client library

Added to portage

2026-06-27

httpx2 - 2.5.0
Ebuild name:

dev-python/httpx2-2.5.0

Description

The next generation HTTP client (Pydantic fork)

Added to portage

2026-06-27

ibus-m17n - 1.4.40
Ebuild name:

app-i18n/ibus-m17n-1.4.40

Description

M17N engine for IBus

Added to portage

2026-06-27

ibus-typing-booster - 2.30.10
Ebuild name:

app-i18n/ibus-typing-booster-2.30.10

Description

Completion input method for IBus

Added to portage

2026-06-27

ipython - 9.15.0
Ebuild name:

dev-python/ipython-9.15.0

Description

Advanced interactive shell for Python

Added to portage

2026-06-27

jinxed - 2.0.4
Ebuild name:

dev-python/jinxed-2.0.4

Description

A pure-Python implementation of a subset of the Python curses library

Added to portage

2026-06-27

joserfc - 1.7.1
Ebuild name:

dev-python/joserfc-1.7.1

Description

A Python library for JOSE RFCs JWS, JWE, JWK, JWA, JWT

Added to portage

2026-06-27

libpass - 1.9.3
Ebuild name:

dev-python/libpass-1.9.3

Description

Fork of passlib, a password hashing framework

Added to portage

2026-06-27

libsquish - 1.15.1.4
Ebuild name:

media-libs/libsquish-1.15.1.4

Description

Library for compressing images with the DXT/S3TC standard

Added to portage

2026-06-27

man-pages-ja - 20260615
Ebuild name:

app-i18n/man-pages-ja-20260615

Description

Collection of manual pages translated into Japanese

Added to portage

2026-06-27

mlt - 7.40.0
Ebuild name:

media-libs/mlt-7.40.0

Description

Open source multimedia framework for television broadcasting

Added to portage

2026-06-27

modus-themes - 5.3.0
Ebuild name:

app-emacs/modus-themes-5.3.0

Description

Highly accessible themes for GNU Emacs

Added to portage

2026-06-27

nerdctl - 2.3.3
Ebuild name:

app-containers/nerdctl-2.3.3

Description

Docker-compatible CLI for containerd, with support for Compose

Added to portage

2026-06-27

nest-asyncio2 - 1.7.2
Ebuild name:

dev-python/nest-asyncio2-1.7.2

Description

Patch asyncio to allow nested event loops

Added to portage

2026-06-27

netavark - 2.0.0
Ebuild name:

app-containers/netavark-2.0.0

Description

A container network stack

Added to portage

2026-06-27

podman - 6.0.0
Ebuild name:

app-containers/podman-6.0.0

Description

A tool for managing OCI containers and pods with Docker-compatible CLI

Added to portage

2026-06-27

podman-tui - 1.11.2
Ebuild name:

app-containers/podman-tui-1.11.2

Description

Terminal UI frontend for Podman

Added to portage

2026-06-27

racket-mode - 1_p20260303
Ebuild name:

app-emacs/racket-mode-1_p20260303

Description

Emacs modes for Racket edit, REPL, check-syntax, debug, profile,

Added to portage

2026-06-27

rclone - 1.74.3
Ebuild name:

net-misc/rclone-1.74.3

Description

A program to sync files to and from various cloud storage providers

Added to portage

2026-06-27

reason - 3.18.0
Ebuild name:

dev-ml/reason-3.18.0

Description

Simple, fast & type safe language that leverages JavaScript and OCaml

Added to portage

2026-06-27

rebulk - 4.1.0
Ebuild name:

dev-python/rebulk-4.1.0

Description

Python library that performs advanced searches in strings

Added to portage

2026-06-27

rsyslog - 8.2606.0
Ebuild name:

app-admin/rsyslog-8.2606.0

Description

An enhanced multi-threaded syslogd with database support and more

Added to portage

2026-06-27

skopeo - 1.23.0-r1
Ebuild name:

app-containers/skopeo-1.23.0-r1

Description

Work with remote container images registries

Added to portage

2026-06-27

sonarr-bin - 4.0.19.2979
Ebuild name:

www-apps/sonarr-bin-4.0.19.2979

Description

Sonarr is a Smart PVR for newsgroup and bittorrent users

Added to portage

2026-06-27

sqlglot - 30.12.0
Ebuild name:

dev-python/sqlglot-30.12.0

Description

An easily customizable SQL parser and transpiler

Added to portage

2026-06-27

syrupy - 5.3.4
Ebuild name:

dev-python/syrupy-5.3.4

Description

The sweeter pytest snapshot plugin

Added to portage

2026-06-27

tables - 3.11.1-r1
Ebuild name:

dev-python/tables-3.11.1-r1

Description

Hierarchical datasets for Python

Added to portage

2026-06-27

translate-toolkit - 3.19.13
Ebuild name:

dev-python/translate-toolkit-3.19.13

Description

Toolkit to convert between many translation formats

Added to portage

2026-06-27

tree-sitter-racket - 0.24.7_p1
Ebuild name:

dev-libs/tree-sitter-racket-0.24.7_p1

Description

Racket programming language grammar for Tree-sitter

Added to portage

2026-06-27

tree-sitter-unison - 2.1.3
Ebuild name:

dev-libs/tree-sitter-unison-2.1.3

Description

Unison programming language grammar for Tree-sitter

Added to portage

2026-06-27

typer - 0.26.8
Ebuild name:

dev-python/typer-0.26.8

Description

Build great CLIs. Easy to code. Based on Python type hints

Added to portage

2026-06-27

uv - 0.11.25
Ebuild name:

dev-python/uv-0.11.25

Description

A Python package installer and resolver, written in Rust

Added to portage

2026-06-27

vcmi - 1.7.4
Ebuild name:

games-strategy/vcmi-1.7.4

Description

Open-source engine for Heroes of Might and Magic III

Added to portage

2026-06-27

2026-06-26
R - 4.6.1
Ebuild name:

dev-lang/R-4.6.1

Description

Language and environment for statistical computing and graphics

Added to portage

2026-06-26

alembic - 1.18.5
Ebuild name:

dev-python/alembic-1.18.5

Description

Database migrations tool, written by the author of SQLAlchemy

Added to portage

2026-06-26

blis - 2.1
Ebuild name:

sci-libs/blis-2.1

Description

BLAS-like Library Instantiation Software Framework

Added to portage

2026-06-26

cifs-utils - 7.6
Ebuild name:

net-fs/cifs-utils-7.6

Description

Tools for Managing Linux CIFS Client Filesystems

Added to portage

2026-06-26

delve - 1.27.0
Ebuild name:

dev-go/delve-1.27.0

Description

A source-level debugger for the Go programming language

Added to portage

2026-06-26

dxvk - 3.0
Ebuild name:

app-emulation/dxvk-3.0

Description

Vulkan-based implementation of D3D9, D3D10 and D3D11 for Linux / Wine

Added to portage

2026-06-26

glycin-loaders - 2.1.5
Ebuild name:

media-libs/glycin-loaders-2.1.5

Description

Loaders for glycin clients (glycin crate or libglycin)

Added to portage

2026-06-26

google-api-python-client - 2.198.0
Ebuild name:

dev-python/google-api-python-client-2.198.0

Description

Google API Client for Python

Added to portage

2026-06-26

google-auth - 2.55.1
Ebuild name:

dev-python/google-auth-2.55.1

Description

Google Authentication Library

Added to portage

2026-06-26

incus - 7.2
Ebuild name:

app-containers/incus-7.2

Description

Modern, secure and powerful system container and virtual machine manager

Added to portage

2026-06-26

ispc - 1.31.0
Ebuild name:

dev-lang/ispc-1.31.0

Description

Intel SPMD Program Compiler

Added to portage

2026-06-26

libtorrent - 0.16.15
Ebuild name:

net-libs/libtorrent-0.16.15

Description

BitTorrent library written in C++ for *nix

Added to portage

2026-06-26

magit-popup - 2.13.3-r1
Ebuild name:

app-emacs/magit-popup-2.13.3-r1

Description

Define prefix-infix-suffix command combos

Added to portage

2026-06-26

mailcrypt - 3.5.9-r3
Ebuild name:

app-emacs/mailcrypt-3.5.9-r3

Description

Provides a simple interface to public key cryptography with OpenPGP

Added to portage

2026-06-26

mutagen - 1.48.1
Ebuild name:

media-libs/mutagen-1.48.1

Description

Audio metadata tag reader and writer implemented in pure Python

Added to portage

2026-06-26

newsboat - 2.44
Ebuild name:

net-news/newsboat-2.44

Description

An RSS/Atom feed reader for text terminals

Added to portage

2026-06-26

pdns - 5.0.6
Ebuild name:

net-dns/pdns-5.0.6

Description

The PowerDNS Daemon

Added to portage

2026-06-26

pdns - 5.1.2
Ebuild name:

net-dns/pdns-5.1.2

Description

The PowerDNS Daemon

Added to portage

2026-06-26

pdns-recursor - 5.3.8
Ebuild name:

net-dns/pdns-recursor-5.3.8

Description

The PowerDNS Recursor

Added to portage

2026-06-26

pdns-recursor - 5.4.3
Ebuild name:

net-dns/pdns-recursor-5.4.3

Description

The PowerDNS Recursor

Added to portage

2026-06-26

photoqt - 5.4
Ebuild name:

media-gfx/photoqt-5.4

Description

Simple but powerful Qt-based image viewer

Added to portage

2026-06-26

photoqt-extensions - 5.4
Ebuild name:

media-plugins/photoqt-extensions-5.4

Description

Official extensions for PhotoQt

Added to portage

2026-06-26

postfix - 3.12_pre20260624
Ebuild name:

mail-mta/postfix-3.12_pre20260624

Description

A fast and secure drop-in replacement for sendmail

Added to portage

2026-06-26

pugixml - 1.16
Ebuild name:

dev-libs/pugixml-1.16

Description

Light-weight, simple, and fast XML parser for C++ with XPath support

Added to portage

2026-06-26

pygraphviz - 2.0
Ebuild name:

dev-python/pygraphviz-2.0

Description

Python wrapper for the Graphviz Agraph data structure

Added to portage

2026-06-26

pyproject-fmt - 2.25.1
Ebuild name:

dev-python/pyproject-fmt-2.25.1

Description

Format your pyproject.toml file

Added to portage

2026-06-26

rtorrent - 0.16.15
Ebuild name:

net-p2p/rtorrent-0.16.15

Description

BitTorrent Client using libtorrent

Added to portage

2026-06-26

rutorrent - 5.3.3
Ebuild name:

www-apps/rutorrent-5.3.3

Description

ruTorrent is a front-end for the popular Bittorrent client rTorrent

Added to portage

2026-06-26

samba - 4.23.9
Ebuild name:

net-fs/samba-4.23.9

Description

Samba Suite Version 4

Added to portage

2026-06-26

setuptools-scm - 10.2.0
Ebuild name:

dev-python/setuptools-scm-10.2.0

Description

Manage versions by scm tags via setuptools

Added to portage

2026-06-26

sphinx-autodoc-typehints - 3.12.0
Ebuild name:

dev-python/sphinx-autodoc-typehints-3.12.0

Description

Type hints support for the Sphinx autodoc extension

Added to portage

2026-06-26

sslscan - 2.2.2
Ebuild name:

net-analyzer/sslscan-2.2.2

Description

Fast SSL configuration scanner

Added to portage

2026-06-26

tox - 4.56.1
Ebuild name:

dev-python/tox-4.56.1

Description

virtualenv-based automation of test activities

Added to portage

2026-06-26

uhd - 4.10.0.0-r1
Ebuild name:

net-wireless/uhd-4.10.0.0-r1

Description

Universal Software Radio Peripheral (USRP) Hardware Driver

Added to portage

2026-06-26

urwid - 4.0.3
Ebuild name:

dev-python/urwid-4.0.3

Description

Curses-based user interface library for Python

Added to portage

2026-06-26

vcs-versioning - 2.2.0
Ebuild name:

dev-python/vcs-versioning-2.2.0

Description

Core VCS versioning functionality from setuptools-scm

Added to portage

2026-06-26

vlc - 4.0.0_pre20260625
Ebuild name:

media-video/vlc-4.0.0_pre20260625

Description

Media player and framework with support for most multimedia files

Added to portage

2026-06-26

wand - 0.7.2
Ebuild name:

dev-python/wand-0.7.2

Description

Ctypes-based simple ImageMagick binding for Python

Added to portage

2026-06-26

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