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:

87554

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-08-10
apache_exporter - 0-r1
Ebuild name:

acct-group/apache_exporter-0-r1

Description

Group used for the apache_exporter prometheus plugin

Added to portage

2026-08-10

apache_exporter - 0-r1
Ebuild name:

acct-user/apache_exporter-0-r1

Description

User for the apache_exporter prometheus plugin

Added to portage

2026-08-10

apache_exporter - 1.1.1
Ebuild name:

app-metrics/apache_exporter-1.1.1

Description

Prometheus exporter for apache metrics

Added to portage

2026-08-10

cjose - 0.6.2.7
Ebuild name:

dev-libs/cjose-0.6.2.7

Description

C library implementing the Javascript Object Signing and Encryption (JOSE)

Added to portage

2026-08-10

dnsdist - 2.1.1
Ebuild name:

net-dns/dnsdist-2.1.1

Description

A highly DNS-, DoS- and abuse-aware loadbalancer

Added to portage

2026-08-10

gdbus-codegen - 2.88.3
Ebuild name:

dev-util/gdbus-codegen-2.88.3

Description

GDBus code and documentation generator

Added to portage

2026-08-10

gentoo-sources - 6.12.103
Ebuild name:

sys-kernel/gentoo-sources-6.12.103

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2026-08-10

gentoo-sources - 6.18.44
Ebuild name:

sys-kernel/gentoo-sources-6.18.44

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2026-08-10

gentoo-sources - 6.6.151
Ebuild name:

sys-kernel/gentoo-sources-6.6.151

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2026-08-10

gentoo-sources - 7.1.8
Ebuild name:

sys-kernel/gentoo-sources-7.1.8

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2026-08-10

glib - 2.88.3
Ebuild name:

dev-libs/glib-2.88.3

Description

The GLib library of C routines

Added to portage

2026-08-10

glib-utils - 2.88.3
Ebuild name:

dev-util/glib-utils-2.88.3

Description

Build utilities for GLib using projects

Added to portage

2026-08-10

libcec - 8.1.6
Ebuild name:

dev-libs/libcec-8.1.6

Description

Library for communicating with the Pulse-Eight USB HDMI-CEC Adaptor

Added to portage

2026-08-10

libssh - 0.11.5
Ebuild name:

net-libs/libssh-0.11.5

Description

Access a working SSH implementation by means of a library

Added to portage

2026-08-10

lsp-mode - 10.0.0
Ebuild name:

app-emacs/lsp-mode-10.0.0

Description

Emacs client/library for the Language Server Protocol

Added to portage

2026-08-10

lsp-mode - 9999
Ebuild name:

app-emacs/lsp-mode-9999

Description

Emacs client/library for the Language Server Protocol

Added to portage

2026-08-10

telega - 0.8.660_p20260806
Ebuild name:

app-emacs/telega-0.8.660_p20260806

Description

Full-featured unofficial GNU Emacs client for Telegram

Added to portage

2026-08-10

vanilla-sources - 6.12.103
Ebuild name:

sys-kernel/vanilla-sources-6.12.103

Description

Full sources for the Linux kernel

Added to portage

2026-08-10

vanilla-sources - 6.18.44
Ebuild name:

sys-kernel/vanilla-sources-6.18.44

Description

Full sources for the Linux kernel

Added to portage

2026-08-10

vanilla-sources - 6.6.151
Ebuild name:

sys-kernel/vanilla-sources-6.6.151

Description

Full sources for the Linux kernel

Added to portage

2026-08-10

vanilla-sources - 7.1.8
Ebuild name:

sys-kernel/vanilla-sources-7.1.8

Description

Full sources for the Linux kernel

Added to portage

2026-08-10

zxing-cpp - 3.1.0
Ebuild name:

media-libs/zxing-cpp-3.1.0

Description

C++ Multi-format 1D/2D barcode image processing library

Added to portage

2026-08-10

2026-08-09
ada - 4.0.0
Ebuild name:

dev-cpp/ada-4.0.0

Description

WHATWG-compliant and fast URL parser written in modern C++

Added to portage

2026-08-09

alembic - 1.19.1
Ebuild name:

dev-python/alembic-1.19.1

Description

Database migrations tool, written by the author of SQLAlchemy

Added to portage

2026-08-09

authheaders - 0.16.3
Ebuild name:

dev-python/authheaders-0.16.3

Description

A library wrapping email authentication header verification and gener

Added to portage

2026-08-09

cachelib - 0.15.4
Ebuild name:

dev-python/cachelib-0.15.4

Description

Collection of cache libraries in the same API interface. Extracted from

Added to portage

2026-08-09

cappa - 0.32.2
Ebuild name:

dev-python/cappa-0.32.2

Description

Declarative CLI argument parser

Added to portage

2026-08-09

coturn - 4.17.2
Ebuild name:

net-im/coturn-4.17.2

Description

coturn TURN server project

Added to portage

2026-08-09

cppgir - 2.0_p20260518
Ebuild name:

dev-cpp/cppgir-2.0_p20260518

Description

GObject-Introspection C++ binding wrapper generator

Added to portage

2026-08-09

docstring-parser - 0.18.0
Ebuild name:

dev-python/docstring-parser-0.18.0

Description

Parse Python docstrings in reST, Google and Numpydoc format

Added to portage

2026-08-09

elementpath - 5.1.4
Ebuild name:

dev-python/elementpath-5.1.4

Description

XPath 1.0/2.0 parsers and selectors for ElementTree and lxml

Added to portage

2026-08-09

ensurepip-setuptools - 84.0.0
Ebuild name:

dev-python/ensurepip-setuptools-84.0.0

Description

Shared setuptools wheel for ensurepip Python module

Added to portage

2026-08-09

gradle-bin - 9.7.0
Ebuild name:

dev-java/gradle-bin-9.7.0

Description

A project automation and build tool with a Groovy based DSL

Added to portage

2026-08-09

huggingface_hub - 1.26.0-r1
Ebuild name:

sci-ml/huggingface_hub-1.26.0-r1

Description

a client library to interact with the Hugging Face Hub

Added to portage

2026-08-09

kicad - 10.0.5
Ebuild name:

sci-electronics/kicad-10.0.5

Description

Electronic Schematic and PCB design tools

Added to portage

2026-08-09

kicad-footprints - 10.0.5
Ebuild name:

sci-electronics/kicad-footprints-10.0.5

Description

Electronic Schematic and PCB design tools footprint librari

Added to portage

2026-08-09

kicad-meta - 10.0.5
Ebuild name:

sci-electronics/kicad-meta-10.0.5

Description

Electronic Schematic and PCB design tools (meta package)

Added to portage

2026-08-09

kicad-packages3d - 10.0.5
Ebuild name:

sci-electronics/kicad-packages3d-10.0.5

Description

Electronic Schematic and PCB design tools 3D package librar

Added to portage

2026-08-09

kicad-symbols - 10.0.5
Ebuild name:

sci-electronics/kicad-symbols-10.0.5

Description

Electronic Schematic and PCB design tools symbol libraries

Added to portage

2026-08-09

kicad-templates - 10.0.5
Ebuild name:

sci-electronics/kicad-templates-10.0.5

Description

Electronic Schematic and PCB design tools project templates

Added to portage

2026-08-09

levenshtein - 0.27.4
Ebuild name:

dev-python/levenshtein-0.27.4

Description

Functions for fast computation of Levenshtein distance, and edit oper

Added to portage

2026-08-09

lfe - 2.2.2
Ebuild name:

dev-lang/lfe-2.2.2

Description

Lisp-flavoured Erlang, a lisp syntax front-end to the Erlang compiler

Added to portage

2026-08-09

lsp-treemacs - 0.5
Ebuild name:

app-emacs/lsp-treemacs-0.5

Description

Integration between lsp-mode and treemacs

Added to portage

2026-08-09

lsp-ui - 8.0.1
Ebuild name:

app-emacs/lsp-ui-8.0.1

Description

UI modules for lsp-mode

Added to portage

2026-08-09

lsp-ui - 9.0.0
Ebuild name:

app-emacs/lsp-ui-9.0.0

Description

UI modules for lsp-mode

Added to portage

2026-08-09

lua-mode - 20210802
Ebuild name:

app-emacs/lua-mode-20210802

Description

An Emacs major mode for editing Lua scripts

Added to portage

2026-08-09

marshmallow - 4.3.1
Ebuild name:

dev-python/marshmallow-4.3.1

Description

A library for converting to and from native Python datatypes

Added to portage

2026-08-09

opera - 134.0.5954.46-r1
Ebuild name:

www-client/opera-134.0.5954.46-r1

Description

A fast and secure web browser

Added to portage

2026-08-09

opera-developer - 136.0.5981.0-r2
Ebuild name:

www-client/opera-developer-136.0.5981.0-r2

Description

A fast and secure web browser

Added to portage

2026-08-09

pdns - 5.0.7
Ebuild name:

net-dns/pdns-5.0.7

Description

The PowerDNS Daemon

Added to portage

2026-08-09

pdns - 5.1.4
Ebuild name:

net-dns/pdns-5.1.4

Description

The PowerDNS Daemon

Added to portage

2026-08-09

pdns-recursor - 5.3.10
Ebuild name:

net-dns/pdns-recursor-5.3.10

Description

The PowerDNS Recursor

Added to portage

2026-08-09

pdns-recursor - 5.4.5
Ebuild name:

net-dns/pdns-recursor-5.4.5

Description

The PowerDNS Recursor

Added to portage

2026-08-09

pkgcore - 0.12.38
Ebuild name:

sys-apps/pkgcore-0.12.38

Description

a framework for package management

Added to portage

2026-08-09

polychromatic - 0.9.8
Ebuild name:

sys-apps/polychromatic-0.9.8

Description

RGB lighting management software for GNU/Linux powered by OpenRazer

Added to portage

2026-08-09

pygit2 - 1.20.0
Ebuild name:

dev-python/pygit2-1.20.0

Description

Python bindings for libgit2

Added to portage

2026-08-09

pytest-forked - 1.7.5
Ebuild name:

dev-python/pytest-forked-1.7.5

Description

Run tests in isolated forked subprocesses

Added to portage

2026-08-09

setuptools - 84.0.0
Ebuild name:

dev-python/setuptools-84.0.0

Description

Collection of extensions to Distutils

Added to portage

2026-08-09

shell-maker - 0.96.1
Ebuild name:

app-emacs/shell-maker-0.96.1

Description

Interaction mode for making comint shells for GNU Emacs

Added to portage

2026-08-09

snakeoil - 0.11.4
Ebuild name:

dev-python/snakeoil-0.11.4

Description

misc common functionality and useful optimizations

Added to portage

2026-08-09

starlette - 1.6.0
Ebuild name:

dev-python/starlette-1.6.0

Description

The little ASGI framework that shines

Added to portage

2026-08-09

tdlib - 1.8.66
Ebuild name:

net-libs/tdlib-1.8.66

Description

Cross-platform library for building Telegram clients

Added to portage

2026-08-09

telegram-desktop - 7.0.9
Ebuild name:

net-im/telegram-desktop-7.0.9

Description

Official desktop client for Telegram

Added to portage

2026-08-09

telegram-desktop-bin - 7.0.9
Ebuild name:

net-im/telegram-desktop-bin-7.0.9

Description

Official desktop client for Telegram (binary package)

Added to portage

2026-08-09

tldextract - 5.3.2
Ebuild name:

dev-python/tldextract-5.3.2

Description

Accurately separate the TLD from the registered domain and subdomains o

Added to portage

2026-08-09

transient - 0.13.7
Ebuild name:

app-emacs/transient-0.13.7

Description

Transient commands abstraction for GNU Emacs

Added to portage

2026-08-09

type-lens - 0.2.6
Ebuild name:

dev-python/type-lens-0.2.6

Description

A library that allows for utilizing Python types at runtime

Added to portage

2026-08-09

unicode-segmentation-rs - 0.3.3
Ebuild name:

dev-python/unicode-segmentation-rs-0.3.3

Description

Unicode segmentation and width for Python using Rust

Added to portage

2026-08-09

vertico - 2.12
Ebuild name:

app-emacs/vertico-2.12

Description

Vertical interactive completion

Added to portage

2026-08-09

virtualenv - 21.7.3
Ebuild name:

dev-python/virtualenv-21.7.3

Description

Virtual Python Environment builder

Added to portage

2026-08-09

wine-staging - 11.15
Ebuild name:

app-emulation/wine-staging-11.15

Description

Free implementation of Windows(tm) on Unix, with Wine-Staging patc

Added to portage

2026-08-09

wine-vanilla - 11.15
Ebuild name:

app-emulation/wine-vanilla-11.15

Description

Free implementation of Windows(tm) on Unix, without external patch

Added to portage

2026-08-09

yaxmldiff - 0.3.0
Ebuild name:

dev-python/yaxmldiff-0.3.0

Description

Yet Another XML Differ

Added to portage

2026-08-09

ytmusicapi - 1.12.2
Ebuild name:

dev-python/ytmusicapi-1.12.2

Description

Unofficial API for YouTube Music

Added to portage

2026-08-09

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