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:

90492

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-11-21
2026-11-20
aws-sam-translator - 1.118.0
Ebuild name:

dev-python/aws-sam-translator-1.118.0

Description

A library that transform SAM templates into AWS CloudFormatio

Added to portage

2026-11-20

cachebox - 6.2.11
Ebuild name:

dev-python/cachebox-6.2.11

Description

The fastest memoizing and caching Python library written in Rust

Added to portage

2026-11-20

cfn-lint - 1.61.0
Ebuild name:

dev-python/cfn-lint-1.61.0

Description

CloudFormation Linter

Added to portage

2026-11-20

configargparse - 1.10.2
Ebuild name:

dev-python/configargparse-1.10.2

Description

Drop-in replacement for argparse supporting config files and env v

Added to portage

2026-11-20

dist-kernel - 6.1.192_p2
Ebuild name:

virtual/dist-kernel-6.1.192_p2

Description

Virtual to depend on any Distribution Kernel

Added to portage

2026-11-20

dist-kernel - 6.12.118_p1
Ebuild name:

virtual/dist-kernel-6.12.118_p1

Description

Virtual to depend on any Distribution Kernel

Added to portage

2026-11-20

dist-kernel - 6.18.64_p1
Ebuild name:

virtual/dist-kernel-6.18.64_p1

Description

Virtual to depend on any Distribution Kernel

Added to portage

2026-11-20

dist-kernel - 6.6.162_p2
Ebuild name:

virtual/dist-kernel-6.6.162_p2

Description

Virtual to depend on any Distribution Kernel

Added to portage

2026-11-20

dist-kernel - 7.3.5_p1
Ebuild name:

virtual/dist-kernel-7.3.5_p1

Description

Virtual to depend on any Distribution Kernel

Added to portage

2026-11-20

exceptiongroup - 1.3.2
Ebuild name:

dev-python/exceptiongroup-1.3.2

Description

Backport of PEP 654 (exception groups)

Added to portage

2026-11-20

gentoo-kernel - 6.1.192_p2
Ebuild name:

sys-kernel/gentoo-kernel-6.1.192_p2

Description

Linux kernel built with Gentoo patches

Added to portage

2026-11-20

gentoo-kernel - 6.12.118_p1
Ebuild name:

sys-kernel/gentoo-kernel-6.12.118_p1

Description

Linux kernel built with Gentoo patches

Added to portage

2026-11-20

gentoo-kernel - 6.18.64_p1
Ebuild name:

sys-kernel/gentoo-kernel-6.18.64_p1

Description

Linux kernel built with Gentoo patches

Added to portage

2026-11-20

gentoo-kernel - 6.6.162_p2
Ebuild name:

sys-kernel/gentoo-kernel-6.6.162_p2

Description

Linux kernel built with Gentoo patches

Added to portage

2026-11-20

gentoo-kernel - 7.3.5_p1
Ebuild name:

sys-kernel/gentoo-kernel-7.3.5_p1

Description

Linux kernel built with Gentoo patches

Added to portage

2026-11-20

gentoo-kernel-bin - 6.1.192_p2
Ebuild name:

sys-kernel/gentoo-kernel-bin-6.1.192_p2

Description

Pre-built Linux kernel with Gentoo patches

Added to portage

2026-11-20

gentoo-kernel-bin - 6.12.118_p1
Ebuild name:

sys-kernel/gentoo-kernel-bin-6.12.118_p1

Description

Pre-built Linux kernel with Gentoo patches

Added to portage

2026-11-20

gentoo-kernel-bin - 6.18.64_p1
Ebuild name:

sys-kernel/gentoo-kernel-bin-6.18.64_p1

Description

Pre-built Linux kernel with Gentoo patches

Added to portage

2026-11-20

gentoo-kernel-bin - 6.6.162_p2
Ebuild name:

sys-kernel/gentoo-kernel-bin-6.6.162_p2

Description

Pre-built Linux kernel with Gentoo patches

Added to portage

2026-11-20

gentoo-kernel-bin - 7.3.5_p1
Ebuild name:

sys-kernel/gentoo-kernel-bin-7.3.5_p1

Description

Pre-built Linux kernel with Gentoo patches

Added to portage

2026-11-20

gentoo-kernel-modprep - 6.1.192_p2
Ebuild name:

sys-kernel/gentoo-kernel-modprep-6.1.192_p2

Description

Minimal subset of gentoo-kernel-bin for building module

Added to portage

2026-11-20

gentoo-kernel-modprep - 6.12.118_p1
Ebuild name:

sys-kernel/gentoo-kernel-modprep-6.12.118_p1

Description

Minimal subset of gentoo-kernel-bin for building modul

Added to portage

2026-11-20

gentoo-kernel-modprep - 6.18.64_p1
Ebuild name:

sys-kernel/gentoo-kernel-modprep-6.18.64_p1

Description

Minimal subset of gentoo-kernel-bin for building module

Added to portage

2026-11-20

gentoo-kernel-modprep - 6.6.162_p2
Ebuild name:

sys-kernel/gentoo-kernel-modprep-6.6.162_p2

Description

Minimal subset of gentoo-kernel-bin for building module

Added to portage

2026-11-20

gentoo-kernel-modprep - 7.3.5_p1
Ebuild name:

sys-kernel/gentoo-kernel-modprep-7.3.5_p1

Description

Minimal subset of gentoo-kernel-bin for building modules,

Added to portage

2026-11-20

gentoo-sources - 6.1.192-r2
Ebuild name:

sys-kernel/gentoo-sources-6.1.192-r2

Description

Full sources including the Gentoo patchset for the . kernel tr

Added to portage

2026-11-20

gentoo-sources - 6.12.118-r1
Ebuild name:

sys-kernel/gentoo-sources-6.12.118-r1

Description

Full sources including the Gentoo patchset for the . kernel t

Added to portage

2026-11-20

gentoo-sources - 6.18.64-r1
Ebuild name:

sys-kernel/gentoo-sources-6.18.64-r1

Description

Full sources including the Gentoo patchset for the . kernel tr

Added to portage

2026-11-20

gentoo-sources - 6.6.162-r2
Ebuild name:

sys-kernel/gentoo-sources-6.6.162-r2

Description

Full sources including the Gentoo patchset for the . kernel tr

Added to portage

2026-11-20

gentoo-sources - 7.3.5-r1
Ebuild name:

sys-kernel/gentoo-sources-7.3.5-r1

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2026-11-20

git-delta - 0.21.2
Ebuild name:

dev-util/git-delta-0.21.2

Description

Syntax-highlighting pager for git

Added to portage

2026-11-20

guessit - 4.5.4
Ebuild name:

dev-python/guessit-4.5.4

Description

Python library for guessing information from video filenames

Added to portage

2026-11-20

hugin - 2026.0.0
Ebuild name:

media-gfx/hugin-2026.0.0

Description

GUI for the creation & processing of panoramic images

Added to portage

2026-11-20

hypothesis - 6.170.16
Ebuild name:

dev-python/hypothesis-6.170.16

Description

A library for property based testing

Added to portage

2026-11-20

jsonpatch - 1.48
Ebuild name:

dev-python/jsonpatch-1.48

Description

Apply JSON-Patches like http

Added to portage

2026-11-20

keystoneauth1 - 5.19.0
Ebuild name:

dev-python/keystoneauth1-5.19.0

Description

This package contains tools for authenticating to an OpenStack-base

Added to portage

2026-11-20

lexbor - 3.0.1
Ebuild name:

dev-libs/lexbor-3.0.1

Description

Modular web engine (HTML/CSS parser, renderer, ...)

Added to portage

2026-11-20

librt - 0.17.0
Ebuild name:

dev-python/librt-0.17.0

Description

Mypyc runtime library

Added to portage

2026-11-20

mesa - 26.3.1
Ebuild name:

media-libs/mesa-26.3.1

Description

OpenGL-like graphic library for Linux

Added to portage

2026-11-20

mesa_clc - 26.3.1
Ebuild name:

dev-util/mesa_clc-26.3.1

Description

mesa_clc tool used for building OpenCL C to SPIR-V

Added to portage

2026-11-20

nautilus - 49.6-r2
Ebuild name:

gnome-base/nautilus-49.6-r2

Description

Default file manager for the GNOME desktop

Added to portage

2026-11-20

pydantic - 2.14.4
Ebuild name:

dev-python/pydantic-2.14.4

Description

Data parsing and validation using Python type hints

Added to portage

2026-11-20

pylast - 7.3.0
Ebuild name:

dev-python/pylast-7.3.0

Description

Python interface to last.fm and other api-compatible websites

Added to portage

2026-11-20

pymongo - 4.20.1
Ebuild name:

dev-python/pymongo-4.20.1

Description

Python driver for MongoDB

Added to portage

2026-11-20

pyotp - 2.12.1
Ebuild name:

dev-python/pyotp-2.12.1

Description

PyOTP is a Python library for generating and verifying one-time passwords

Added to portage

2026-11-20

pytest-env - 1.8.7
Ebuild name:

dev-python/pytest-env-1.8.7

Description

pytest plugin that allows you to add environment variables

Added to portage

2026-11-20

python-manilaclient - 6.4.0
Ebuild name:

dev-python/python-manilaclient-6.4.0

Description

Python bindings to the OpenStack Manila API

Added to portage

2026-11-20

quantities - 0.17.0
Ebuild name:

dev-python/quantities-0.17.0

Description

Support for physical quantities with units, based on numpy

Added to portage

2026-11-20

stripe - 17.1.0
Ebuild name:

dev-python/stripe-17.1.0

Description

Stripe Python bindings

Added to portage

2026-11-20

trakit - 0.5.0
Ebuild name:

dev-python/trakit-0.5.0

Description

Guess additional information from titles in media tracks

Added to portage

2026-11-20

typeguard - 4.6.1
Ebuild name:

dev-python/typeguard-4.6.1

Description

Run-time type checker for Python

Added to portage

2026-11-20

xlsxwriter - 3.3.2
Ebuild name:

dev-python/xlsxwriter-3.3.2

Description

Python module for creating Excel XLSX files

Added to portage

2026-11-20

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