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:

85324

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-05-24
2026-05-23
awscli - 1.45.14
Ebuild name:

app-admin/awscli-1.45.14

Description

Universal Command Line Environment for AWS

Added to portage

2026-05-23

blessed - 1.42.0
Ebuild name:

dev-python/blessed-1.42.0

Description

Library for making terminal apps using colors, keyboard input and positio

Added to portage

2026-05-23

boto3 - 1.43.14
Ebuild name:

dev-python/boto3-1.43.14

Description

The AWS SDK for Python

Added to portage

2026-05-23

botocore - 1.43.14
Ebuild name:

dev-python/botocore-1.43.14

Description

Low-level, data-driven core of boto 3

Added to portage

2026-05-23

c2ffi - 21.1.0.20260104
Ebuild name:

dev-lisp/c2ffi-21.1.0.20260104

Description

Clang-based FFI wrapper generator for Common Lisp

Added to portage

2026-05-23

click - 8.4.1
Ebuild name:

dev-python/click-8.4.1

Description

A Python package for creating beautiful command line interfaces

Added to portage

2026-05-23

crossdev - 20260501-r1
Ebuild name:

sys-devel/crossdev-20260501-r1

Description

Gentoo Cross-toolchain generator

Added to portage

2026-05-23

cucumber-expressions - 19.0.1
Ebuild name:

dev-python/cucumber-expressions-19.0.1

Description

Human friendly alternative to Regular Expressions

Added to portage

2026-05-23

deno-bin - 2.8.0
Ebuild name:

dev-lang/deno-bin-2.8.0

Description

Modern runtime for JavaScript and TypeScript

Added to portage

2026-05-23

faker - 40.19.1
Ebuild name:

dev-python/faker-40.19.1

Description

A Python package that generates fake data for you

Added to portage

2026-05-23

gentoo-sources - 7.0.9-r5
Ebuild name:

sys-kernel/gentoo-sources-7.0.9-r5

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2026-05-23

gnome-settings-daemon - 49.1-r1
Ebuild name:

gnome-base/gnome-settings-daemon-49.1-r1

Description

Gnome Settings Daemon

Added to portage

2026-05-23

gr-rds - 0.0_p20250404-r1
Ebuild name:

net-wireless/gr-rds-0.0_p20250404-r1

Description

GNU Radio FM RDS Receiver

Added to portage

2026-05-23

graph-tool - 2.98
Ebuild name:

dev-python/graph-tool-2.98

Description

An efficient python module for manipulation and statistical analysis of

Added to portage

2026-05-23

griddataformats - 1.2.0
Ebuild name:

dev-python/griddataformats-1.2.0

Description

Reading and writing of data on regular grids in Python

Added to portage

2026-05-23

icalendar - 7.1.2
Ebuild name:

dev-python/icalendar-7.1.2

Description

RFC 5545 compatible parser and generator of iCalendar files

Added to portage

2026-05-23

jellyfin-bin - 10.11.9
Ebuild name:

www-apps/jellyfin-bin-10.11.9

Description

Jellyfin puts you in control of managing and streaming your media

Added to portage

2026-05-23

jinxed - 2.0.1
Ebuild name:

dev-python/jinxed-2.0.1

Description

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

Added to portage

2026-05-23

jwt-cpp - 0.7.2-r1
Ebuild name:

dev-cpp/jwt-cpp-0.7.2-r1

Description

header only library for creating and validating JSON Web Tokens in C++11

Added to portage

2026-05-23

libgit2 - 1.9.4
Ebuild name:

dev-libs/libgit2-1.9.4

Description

A linkable library for Git

Added to portage

2026-05-23

liblms7002m - 0.0_p20200518-r3
Ebuild name:

net-wireless/liblms7002m-0.0_p20200518-r3

Description

Compact LMS7002M library suitable for resource-limited MC

Added to portage

2026-05-23

lmod - 9.2.2
Ebuild name:

sys-cluster/lmod-9.2.2

Description

Environment Module System based on Lua

Added to portage

2026-05-23

more-itertools - 11.1.0
Ebuild name:

dev-python/more-itertools-11.1.0

Description

More routines for operating on iterables, beyond itertools

Added to portage

2026-05-23

multi-term - 1.4-r1
Ebuild name:

app-emacs/multi-term-1.4-r1

Description

Manage multiple terminal buffers in Emacs

Added to portage

2026-05-23

nginx - 1.30.2
Ebuild name:

www-servers/nginx-1.30.2

Description

Added to portage

2026-05-23

nvidia-drivers - 595.44.09
Ebuild name:

x11-drivers/nvidia-drivers-595.44.09

Description

NVIDIA Accelerated Graphics Driver

Added to portage

2026-05-23

pika - 1.4.1
Ebuild name:

dev-python/pika-1.4.1

Description

Pure-Python implementation of the AMQP

Added to portage

2026-05-23

portage - 3.0.79
Ebuild name:

sys-apps/portage-3.0.79

Description

The package management and distribution system for Gentoo

Added to portage

2026-05-23

pypdf - 6.12.1
Ebuild name:

dev-python/pypdf-6.12.1

Description

Python library to work with PDF files

Added to portage

2026-05-23

pytest-rerunfailures - 16.3
Ebuild name:

dev-python/pytest-rerunfailures-16.3

Description

pytest plugin to re-run tests to eliminate flaky failures

Added to portage

2026-05-23

qtdeclarative - 6.11.1-r1
Ebuild name:

dev-qt/qtdeclarative-6.11.1-r1

Description

Qt Declarative (Quick 2)

Added to portage

2026-05-23

qtile - 0.36.0
Ebuild name:

x11-wm/qtile-0.36.0

Description

A full-featured, hackable tiling window manager written in Python

Added to portage

2026-05-23

raspberrypi-firmware - 1.20260521
Ebuild name:

sys-boot/raspberrypi-firmware-1.20260521

Description

Raspberry Pi (all versions) bootloader and GPU firmware

Added to portage

2026-05-23

raspberrypi-image - 6.18.32_p20260521
Ebuild name:

sys-kernel/raspberrypi-image-6.18.32_p20260521

Description

Raspberry Pi (all versions) kernel and modules

Added to portage

2026-05-23

raspberrypi-sources - 6.18.32_p20260521
Ebuild name:

sys-kernel/raspberrypi-sources-6.18.32_p20260521

Description

Raspberry Pi kernel sources

Added to portage

2026-05-23

snapd-glib - 1.72
Ebuild name:

sys-libs/snapd-glib-1.72

Description

glib library for communicating with snapd

Added to portage

2026-05-23

sunshine - 2026.516.143833
Ebuild name:

net-misc/sunshine-2026.516.143833

Description

Self-hosted game stream host for Moonlight

Added to portage

2026-05-23

superlu_mt - 4.0.2
Ebuild name:

sci-libs/superlu_mt-4.0.2

Description

Multithreaded sparse LU factorization library

Added to portage

2026-05-23

trove-classifiers - 2026.5.22.10
Ebuild name:

dev-python/trove-classifiers-2026.5.22.10

Description

Canonical source for classifiers on PyPI (pypi.org)

Added to portage

2026-05-23

virt-firmware - 26.5.4
Ebuild name:

app-emulation/virt-firmware-26.5.4

Description

Tools for ovmf/armvirt firmware volumes

Added to portage

2026-05-23

vpl-gpu-rt - 26.2.0
Ebuild name:

media-libs/vpl-gpu-rt-26.2.0

Description

Intel Video Processing Library GPU Runtime

Added to portage

2026-05-23

wrapt - 2.2.1
Ebuild name:

dev-python/wrapt-2.2.1

Description

Module for decorators, wrappers and monkey patching

Added to portage

2026-05-23

yle-dl - 20260520
Ebuild name:

media-video/yle-dl-20260520

Description

Download media files from Yle Areena

Added to portage

2026-05-23

zotero-bin - 9.0.4
Ebuild name:

app-text/zotero-bin-9.0.4

Description

Helps you collect, organize, cite, and share your research sources

Added to portage

2026-05-23

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