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:

88153

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-09-05
derper - 1.102.2-r1
Ebuild name:

net-vpn/derper-1.102.2-r1

Description

DERP server for tailscale network

Added to portage

2026-09-05

libxml2 - 2.15.4
Ebuild name:

dev-libs/libxml2-2.15.4

Description

XML C parser and toolkit

Added to portage

2026-09-05

pdns-recursor - 5.4.6
Ebuild name:

net-dns/pdns-recursor-5.4.6

Description

The PowerDNS Recursor

Added to portage

2026-09-05

util-linux - 2.42.3
Ebuild name:

sys-apps/util-linux-2.42.3

Description

Various useful Linux utilities

Added to portage

2026-09-05

2026-09-04
7zip - 26.03
Ebuild name:

app-arch/7zip-26.03

Description

Free file archiver for extremely high compression

Added to portage

2026-09-04

QGnomePlatform - 0.9.2-r8
Ebuild name:

x11-themes/QGnomePlatform-0.9.2-r8

Description

Qt Platform Theme aimed to accommodate GNOME settings

Added to portage

2026-09-04

adwaita-qt - 1.4.2-r2
Ebuild name:

x11-themes/adwaita-qt-1.4.2-r2

Description

A style to bend Qt applications to look like they belong into GNOME

Added to portage

2026-09-04

boto3 - 1.43.88
Ebuild name:

dev-python/boto3-1.43.88

Description

The AWS SDK for Python

Added to portage

2026-09-04

botocore - 1.43.88
Ebuild name:

dev-python/botocore-1.43.88

Description

Low-level, data-driven core of boto 3

Added to portage

2026-09-04

django-otp - 1.7.2
Ebuild name:

dev-python/django-otp-1.7.2

Description

Django framework adding two-factor authentication using one-time passwo

Added to portage

2026-09-04

docker - 29.8.0
Ebuild name:

app-containers/docker-29.8.0

Description

The core functions you need to create Docker images and run Docker con

Added to portage

2026-09-04

docker-buildx - 0.37.0
Ebuild name:

app-containers/docker-buildx-0.37.0

Description

Docker CLI plugin for extended build capabilities with BuildKit

Added to portage

2026-09-04

docker-cli - 29.8.0
Ebuild name:

app-containers/docker-cli-29.8.0

Description

the command line binary for docker

Added to portage

2026-09-04

docker-compose - 5.5.1
Ebuild name:

app-containers/docker-compose-5.5.1

Description

Multi-container orchestration for Docker

Added to portage

2026-09-04

docker-credential-helpers - 0.9.9
Ebuild name:

app-containers/docker-credential-helpers-0.9.9

Description

Suite of programs to use native stores to keep Docke

Added to portage

2026-09-04

egl-gbm - 1.1.4
Ebuild name:

gui-libs/egl-gbm-1.1.4

Description

NVIDIA GBM EGL external platform library

Added to portage

2026-09-04

egl-wayland - 1.1.22
Ebuild name:

gui-libs/egl-wayland-1.1.22

Description

NVIDIA wayland EGL external platform library

Added to portage

2026-09-04

egl-wayland2 - 1.0.2
Ebuild name:

gui-libs/egl-wayland2-1.0.2

Description

NVIDIA wayland EGL external platform library, version 2

Added to portage

2026-09-04

egl-x11 - 1.0.6
Ebuild name:

gui-libs/egl-x11-1.0.6

Description

NVIDIA X11/XCB EGL external platform library

Added to portage

2026-09-04

etcd - 3.5.33
Ebuild name:

dev-db/etcd-3.5.33

Description

Highly-available key value store for shared configuration and service discovery

Added to portage

2026-09-04

github-cli - 2.100.0
Ebuild name:

dev-util/github-cli-2.100.0

Description

GitHub CLI

Added to portage

2026-09-04

gitlab-cli - 1.116.0
Ebuild name:

dev-util/gitlab-cli-1.116.0

Description

the official gitlab command line interface

Added to portage

2026-09-04

go - 1.27.1
Ebuild name:

dev-lang/go-1.27.1

Description

A concurrent garbage collected and typesafe programming language

Added to portage

2026-09-04

google-api-core - 2.36.0
Ebuild name:

dev-python/google-api-core-2.36.0

Description

Core Library for Google Client Libraries

Added to portage

2026-09-04

google-auth - 2.57.1
Ebuild name:

dev-python/google-auth-2.57.1

Description

Google Authentication Library

Added to portage

2026-09-04

googleapis-common-protos - 1.75.3
Ebuild name:

dev-python/googleapis-common-protos-1.75.3

Description

Python classes generated from the common protos in the g

Added to portage

2026-09-04

jj - 0.45.1
Ebuild name:

dev-vcs/jj-0.45.1

Description

Jujutsu - an experimental version control system

Added to portage

2026-09-04

libmirage - 3.3.3
Ebuild name:

dev-libs/libmirage-3.3.3

Description

CD and DVD image access library

Added to portage

2026-09-04

lice-el - 0.3
Ebuild name:

app-emacs/lice-el-0.3

Description

License and header template for GNU Emacs

Added to portage

2026-09-04

llama - 1.0.5
Ebuild name:

app-emacs/llama-1.0.5

Description

Compact syntax for short lambda

Added to portage

2026-09-04

load-relative - 1.3.1
Ebuild name:

app-emacs/load-relative-1.3.1

Description

Relative loads for Emacs Lisp files

Added to portage

2026-09-04

load-relative - 1.3.2
Ebuild name:

app-emacs/load-relative-1.3.2

Description

Relative loads for Emacs Lisp files

Added to portage

2026-09-04

log4e - 0.4.1
Ebuild name:

app-emacs/log4e-0.4.1

Description

Logging framework for GNU Emacs Lisp

Added to portage

2026-09-04

lookup - 1.99.96_pre20180209
Ebuild name:

app-emacs/lookup-1.99.96_pre20180209

Description

An interface to search CD-ROM books and network dictionaries

Added to portage

2026-09-04

lsp-docker - 1.0.0_p20240327
Ebuild name:

app-emacs/lsp-docker-1.0.0_p20240327

Description

Emacs library to leverage lsp-mode in the Docker environment

Added to portage

2026-09-04

lsp-java - 4.0
Ebuild name:

app-emacs/lsp-java-4.0

Description

Emacs Java IDE using Eclipse JDT Language Server

Added to portage

2026-09-04

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-09-04

micawber - 0.8.0
Ebuild name:

dev-python/micawber-0.8.0

Description

A small library for extracting rich content from urls

Added to portage

2026-09-04

mongodb-compass-bin - 1.50.0
Ebuild name:

dev-db/mongodb-compass-bin-1.50.0

Description

GUI for MongoDB

Added to portage

2026-09-04

nvidia-vaapi-driver - 0.0.18
Ebuild name:

media-libs/nvidia-vaapi-driver-0.0.18

Description

A VA-API implemention using NVIDIA's NVDEC

Added to portage

2026-09-04

openvpn - 2.7.6
Ebuild name:

net-vpn/openvpn-2.7.6

Description

Robust and highly flexible tunneling application compatible with many OSes

Added to portage

2026-09-04

pixi - 0.79.0
Ebuild name:

dev-util/pixi-0.79.0

Description

A package management and workflow tool

Added to portage

2026-09-04

postfix - 3.12_pre20260901
Ebuild name:

mail-mta/postfix-3.12_pre20260901

Description

A fast and secure drop-in replacement for sendmail

Added to portage

2026-09-04

pytest-rerunfailures - 16.6.1
Ebuild name:

dev-python/pytest-rerunfailures-16.6.1

Description

pytest plugin to re-run tests to eliminate flaky failures

Added to portage

2026-09-04

setuptools-scm - 10.2.3
Ebuild name:

dev-python/setuptools-scm-10.2.3

Description

Manage versions by scm tags via setuptools

Added to portage

2026-09-04

slirp4netns - 1.3.5
Ebuild name:

app-containers/slirp4netns-1.3.5

Description

User-mode networking for unprivileged network namespaces

Added to portage

2026-09-04

snmp_exporter - 0.30.1
Ebuild name:

app-metrics/snmp_exporter-0.30.1

Description

Prometheus exporter for snmp metrics

Added to portage

2026-09-04

sqlglot - 30.18.0
Ebuild name:

dev-python/sqlglot-30.18.0

Description

An easily customizable SQL parser and transpiler

Added to portage

2026-09-04

terraform - 1.16.1
Ebuild name:

app-admin/terraform-1.16.1

Description

A tool for building, changing, and combining infrastructure safely

Added to portage

2026-09-04

urwid - 4.1.1
Ebuild name:

dev-python/urwid-4.1.1

Description

Curses-based user interface library for Python

Added to portage

2026-09-04

vcs-versioning - 2.3.4
Ebuild name:

dev-python/vcs-versioning-2.3.4

Description

Core VCS versioning functionality from setuptools-scm

Added to portage

2026-09-04

vdirsyncer - 0.21.0
Ebuild name:

dev-python/vdirsyncer-0.21.0

Description

Synchronize calendars and contacts

Added to portage

2026-09-04

vopono - 1.0.1
Ebuild name:

net-vpn/vopono-1.0.1

Description

Launch applications via VPN tunnels using temporary network namespaces

Added to portage

2026-09-04

yq-go - 4.53.6
Ebuild name:

app-misc/yq-go-4.53.6

Description

yq is a lightweight and portable command-line YAML, JSON and XML processor

Added to portage

2026-09-04

zmq-anyio - 0.4.1
Ebuild name:

dev-python/zmq-anyio-0.4.1

Description

Asynchronous API for ZMQ using AnyIO

Added to portage

2026-09-04

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