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:

84232

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.1 (40 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-04-08
2026-04-07
awscli - 1.44.74
Ebuild name:

app-admin/awscli-1.44.74

Description

Universal Command Line Environment for AWS

Added to portage

2026-04-07

borgmatic - 2.1.4
Ebuild name:

app-backup/borgmatic-2.1.4

Description

Automatically create, prune and verify backups with borgbackup

Added to portage

2026-04-07

boto3 - 1.42.84
Ebuild name:

dev-python/boto3-1.42.84

Description

The AWS SDK for Python

Added to portage

2026-04-07

botocore - 1.42.84
Ebuild name:

dev-python/botocore-1.42.84

Description

Low-level, data-driven core of boto 3

Added to portage

2026-04-07

bsnes-jg - 2.1.0
Ebuild name:

games-emulation/bsnes-jg-2.1.0

Description

Jolly Good Fork of bsnes

Added to portage

2026-04-07

chromium - 148.0.7766.3
Ebuild name:

www-client/chromium-148.0.7766.3

Description

Open-source version of Google Chrome web browser

Added to portage

2026-04-07

clang - 22.1.3
Ebuild name:

dev-python/clang-22.1.3

Description

Python bindings for llvm-core/clang

Added to portage

2026-04-07

clang - 22.1.3
Ebuild name:

llvm-core/clang-22.1.3

Description

C language family frontend for LLVM

Added to portage

2026-04-07

clang-common - 22.1.3
Ebuild name:

llvm-core/clang-common-22.1.3

Description

Common files shared between multiple slots of clang

Added to portage

2026-04-07

compiler-rt - 22.1.3
Ebuild name:

llvm-runtimes/compiler-rt-22.1.3

Description

Compiler runtime library for clang (built-in part)

Added to portage

2026-04-07

compiler-rt-sanitizers - 22.1.3
Ebuild name:

llvm-runtimes/compiler-rt-sanitizers-22.1.3

Description

Compiler runtime libraries for clang (sanitizers & xray

Added to portage

2026-04-07

django-tables2 - 2.9.0
Ebuild name:

dev-python/django-tables2-2.9.0

Description

Table/data-grid framework for Django

Added to portage

2026-04-07

doge - 3.9.2
Ebuild name:

games-misc/doge-3.9.2

Description

wow very terminal doge

Added to portage

2026-04-07

environs - 15.0.1
Ebuild name:

dev-python/environs-15.0.1

Description

Python library for simplified environment variable parsing

Added to portage

2026-04-07

ergo - 2.18.0
Ebuild name:

net-irc/ergo-2.18.0

Description

Modern IRC server written in Go

Added to portage

2026-04-07

faker - 40.13.0
Ebuild name:

dev-python/faker-40.13.0

Description

A Python package that generates fake data for you

Added to portage

2026-04-07

flang - 22.1.3
Ebuild name:

llvm-core/flang-22.1.3

Description

LLVM's Fortran frontend

Added to portage

2026-04-07

flang-rt - 22.1.3
Ebuild name:

llvm-runtimes/flang-rt-22.1.3

Description

LLVM's Fortran runtime

Added to portage

2026-04-07

fq - 0.17.0
Ebuild name:

dev-util/fq-0.17.0

Description

Tool for working with binary data (app-misc/jq for binary formats)

Added to portage

2026-04-07

gdbus-codegen - 2.86.5
Ebuild name:

dev-util/gdbus-codegen-2.86.5

Description

GDBus code and documentation generator

Added to portage

2026-04-07

gdbus-codegen - 2.88.0
Ebuild name:

dev-util/gdbus-codegen-2.88.0

Description

GDBus code and documentation generator

Added to portage

2026-04-07

git-delta - 0.19.2
Ebuild name:

dev-util/git-delta-0.19.2

Description

Syntax-highlighting pager for git

Added to portage

2026-04-07

glib - 2.84.4-r4
Ebuild name:

dev-libs/glib-2.84.4-r4

Description

The GLib library of C routines

Added to portage

2026-04-07

glib - 2.86.5
Ebuild name:

dev-libs/glib-2.86.5

Description

The GLib library of C routines

Added to portage

2026-04-07

glib - 2.88.0
Ebuild name:

dev-libs/glib-2.88.0

Description

The GLib library of C routines

Added to portage

2026-04-07

glib-utils - 2.86.5
Ebuild name:

dev-util/glib-utils-2.86.5

Description

Build utilities for GLib using projects

Added to portage

2026-04-07

glib-utils - 2.88.0
Ebuild name:

dev-util/glib-utils-2.88.0

Description

Build utilities for GLib using projects

Added to portage

2026-04-07

gn - 0.2354
Ebuild name:

dev-build/gn-0.2354

Description

GN is a meta-build system that generates build files for Ninja

Added to portage

2026-04-07

granite - 7.8.1-r1
Ebuild name:

dev-libs/granite-7.8.1-r1

Description

Elementary OS library that extends GTK+

Added to portage

2026-04-07

gsd - 5.0.0
Ebuild name:

dev-python/gsd-5.0.0

Description

GSD - file format specification and a library to read and write it

Added to portage

2026-04-07

indilib - 2.2.0
Ebuild name:

sci-libs/indilib-2.2.0

Description

INDI Astronomical Control Protocol library

Added to portage

2026-04-07

jgrf - 1.3.0
Ebuild name:

games-emulation/jgrf-1.3.0

Description

The Jolly Good Reference Frontend

Added to portage

2026-04-07

jwcrypto - 1.5.7
Ebuild name:

dev-python/jwcrypto-1.5.7

Description

Implements JWK,JWS,JWE specifications using python-cryptography

Added to portage

2026-04-07

kio-gopher - 2.0.0
Ebuild name:

kde-misc/kio-gopher-2.0.0

Description

Gopher KIO worker for Konqueror

Added to portage

2026-04-07

kstars - 3.8.2
Ebuild name:

sci-astronomy/kstars-3.8.2

Description

Desktop Planetarium

Added to portage

2026-04-07

libclc - 22.1.3
Ebuild name:

llvm-core/libclc-22.1.3

Description

OpenCL C library

Added to portage

2026-04-07

libcxx - 22.1.3
Ebuild name:

llvm-runtimes/libcxx-22.1.3

Description

New implementation of the C++ standard library, targeting C++11

Added to portage

2026-04-07

libcxxabi - 22.1.3
Ebuild name:

llvm-runtimes/libcxxabi-22.1.3

Description

Low level support for a standard C++ library

Added to portage

2026-04-07

libgcc - 22.1.3
Ebuild name:

llvm-runtimes/libgcc-22.1.3

Description

Compiler runtime library for clang, compatible with libgcc_s

Added to portage

2026-04-07

libsvm - 3.37
Ebuild name:

sci-libs/libsvm-3.37

Description

Library for Support Vector Machines

Added to portage

2026-04-07

libunwind - 22.1.3
Ebuild name:

llvm-runtimes/libunwind-22.1.3

Description

C++ runtime stack unwinder from LLVM

Added to portage

2026-04-07

lit - 22.1.3
Ebuild name:

dev-python/lit-22.1.3

Description

A stand-alone install of the LLVM suite testing tool

Added to portage

2026-04-07

lld - 22.1.3
Ebuild name:

llvm-core/lld-22.1.3

Description

The LLVM linker (link editor)

Added to portage

2026-04-07

lldb - 22.1.3
Ebuild name:

llvm-core/lldb-22.1.3

Description

The LLVM debugger

Added to portage

2026-04-07

llvm - 22.1.3
Ebuild name:

dev-ml/llvm-22.1.3

Description

OCaml bindings for LLVM

Added to portage

2026-04-07

llvm - 22.1.3
Ebuild name:

llvm-core/llvm-22.1.3

Description

Low Level Virtual Machine

Added to portage

2026-04-07

llvm-common - 22.1.3
Ebuild name:

llvm-core/llvm-common-22.1.3

Description

Common files shared between multiple slots of LLVM

Added to portage

2026-04-07

mlir - 22.1.3
Ebuild name:

llvm-core/mlir-22.1.3

Description

Multi-Level Intermediate Representation (library only)

Added to portage

2026-04-07

moor - 2.12.0
Ebuild name:

sys-apps/moor-2.12.0

Description

Pager designed to do the right thing without any configuration

Added to portage

2026-04-07

mypy - 1.18.1-r1
Ebuild name:

dev-python/mypy-1.18.1-r1

Description

Optional static typing for Python

Added to portage

2026-04-07

mypy - 1.18.2-r1
Ebuild name:

dev-python/mypy-1.18.2-r1

Description

Optional static typing for Python

Added to portage

2026-04-07

narwhals - 2.19.0
Ebuild name:

dev-python/narwhals-2.19.0

Description

Extremely lightweight compatibility layer between dataframe libraries

Added to portage

2026-04-07

nasty - 0.6-r2
Ebuild name:

app-crypt/nasty-0.6-r2

Description

Proof-of-concept GPG passphrase recovery tool

Added to portage

2026-04-07

neomutt - 20260406
Ebuild name:

mail-client/neomutt-20260406

Description

A small but very powerful text-based mail client

Added to portage

2026-04-07

nitrocli - 0.4.1-r2
Ebuild name:

app-crypt/nitrocli-0.4.1-r2

Description

A command line tool for interacting with Nitrokey devices

Added to portage

2026-04-07

nwipe - 0.39
Ebuild name:

app-crypt/nwipe-0.39

Description

Securely erase disks using a variety of recognized methods

Added to portage

2026-04-07

nwipe - 0.40
Ebuild name:

app-crypt/nwipe-0.40

Description

Securely erase disks using a variety of recognized methods

Added to portage

2026-04-07

ocserv - 1.4.1
Ebuild name:

net-vpn/ocserv-1.4.1

Description

Openconnect SSL VPN server

Added to portage

2026-04-07

offload - 22.1.3
Ebuild name:

llvm-runtimes/offload-22.1.3

Description

OpenMP offloading support

Added to portage

2026-04-07

onak - 0.6.3
Ebuild name:

app-crypt/onak-0.6.3

Description

onak is an OpenPGP keyserver

Added to portage

2026-04-07

openmp - 22.1.3
Ebuild name:

llvm-runtimes/openmp-22.1.3

Description

OpenMP runtime library for LLVM/clang compiler

Added to portage

2026-04-07

openmp-amdgcn-amd-amdhsa - 22.1.3
Ebuild name:

llvm-runtimes/openmp-amdgcn-amd-amdhsa-22.1.3

Description

OpenMP target library for amdgcn devices

Added to portage

2026-04-07

openmp-nvptx64-nvidia-cuda - 22.1.3
Ebuild name:

llvm-runtimes/openmp-nvptx64-nvidia-cuda-22.1.3

Description

OpenMP target library for nvptx64 devices

Added to portage

2026-04-07

palo - 2.29
Ebuild name:

sys-boot/palo-2.29

Description

PALO PArisc Linux Loader

Added to portage

2026-04-07

pkixssh - 18.0.2
Ebuild name:

net-misc/pkixssh-18.0.2

Description

OpenSSH fork with X.509 v3 certificate support

Added to portage

2026-04-07

polly - 22.1.3
Ebuild name:

llvm-core/polly-22.1.3

Description

Polyhedral optimizations for LLVM

Added to portage

2026-04-07

postfix - 3.12_pre20260406
Ebuild name:

mail-mta/postfix-3.12_pre20260406

Description

A fast and secure drop-in replacement for sendmail

Added to portage

2026-04-07

pylru - 1.3.1
Ebuild name:

dev-python/pylru-1.3.1

Description

A least recently used (LRU) cache for Python

Added to portage

2026-04-07

python-subunit - 1.4.4-r1
Ebuild name:

dev-python/python-subunit-1.4.4-r1

Description

A streaming protocol for test results

Added to portage

2026-04-07

python-subunit - 1.4.5-r1
Ebuild name:

dev-python/python-subunit-1.4.5-r1

Description

A streaming protocol for test results

Added to portage

2026-04-07

qtile - 0.35.0-r1
Ebuild name:

x11-wm/qtile-0.35.0-r1

Description

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

Added to portage

2026-04-07

recurring-ical-events - 3.8.1-r1
Ebuild name:

dev-python/recurring-ical-events-3.8.1-r1

Description

Repeat ICalendar events by RRULE, RDATE and EXDATE

Added to portage

2026-04-07

rsync - 3.4.1-r3
Ebuild name:

net-misc/rsync-3.4.1-r3

Description

File transfer program to keep remote files into sync

Added to portage

2026-04-07

rtslib-fb - 2.2.4-r1
Ebuild name:

dev-python/rtslib-fb-2.2.4-r1

Description

A Python object API for managing the Linux LIO kernel target

Added to portage

2026-04-07

sameboy-jg - 1.0.3
Ebuild name:

games-emulation/sameboy-jg-1.0.3

Description

Jolly Good Port of SameBoy

Added to portage

2026-04-07

testtools - 2.9.0
Ebuild name:

dev-python/testtools-2.9.0

Description

Extensions to the Python standard library unit testing framework

Added to portage

2026-04-07

uvicorn - 0.44.0
Ebuild name:

dev-python/uvicorn-0.44.0

Description

Lightning-fast ASGI server implementation

Added to portage

2026-04-07

zellij - 0.44.1
Ebuild name:

app-misc/zellij-0.44.1

Description

A terminal workspace with batteries included

Added to portage

2026-04-07

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