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:

82099

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
2025-11-17
boogie - 3.5.5-r1
Ebuild name:

dev-lang/boogie-3.5.5-r1

Description

SMT-based program verifier

Added to portage

2025-11-17

chromium - 142.0.7444.162
Ebuild name:

www-client/chromium-142.0.7444.162

Description

Open-source version of Google Chrome web browser

Added to portage

2025-11-17

csharp-gentoodotnetinfo - 2.0.0-r1
Ebuild name:

dev-dotnet/csharp-gentoodotnetinfo-2.0.0-r1

Description

.NET information tool for Gentoo

Added to portage

2025-11-17

dotnet-outdated - 4.6.4-r2
Ebuild name:

dev-dotnet/dotnet-outdated-4.6.4-r2

Description

Display and update outdated NuGet packages in a project

Added to portage

2025-11-17

easycrypt - 2025.11
Ebuild name:

sci-mathematics/easycrypt-2025.11

Description

Computer-Aided Cryptographic Proofs

Added to portage

2025-11-17

eisl - 5.58
Ebuild name:

dev-lang/eisl-5.58

Description

Interpreter and compiler compatible with the ISLisp standard

Added to portage

2025-11-17

git-filter-repo - 2.47.0-r1
Ebuild name:

dev-vcs/git-filter-repo-2.47.0-r1

Description

Quickly rewrite git repository history (filter-branch replacement

Added to portage

2025-11-17

nprolog - 4.76
Ebuild name:

dev-lang/nprolog-4.76

Description

Interpreter and compiler to be compatible with Arity/Prolog32

Added to portage

2025-11-17

poke - 3.0
Ebuild name:

app-emacs/poke-3.0

Description

Emacs meets GNU poke

Added to portage

2025-11-17

poke - 3.2
Ebuild name:

app-emacs/poke-3.2

Description

Emacs meets GNU poke

Added to portage

2025-11-17

poke-mode - 3.0
Ebuild name:

app-emacs/poke-mode-3.0

Description

Major mode for editing Poke programs

Added to portage

2025-11-17

polymode - 0.2.2_p20220322
Ebuild name:

app-emacs/polymode-0.2.2_p20220322

Description

Framework for Multiple Major Modes in Emacs

Added to portage

2025-11-17

popup - 0.5.9
Ebuild name:

app-emacs/popup-0.5.9

Description

Visual popup interface library for Emacs

Added to portage

2025-11-17

tempel - 1.8
Ebuild name:

app-emacs/tempel-1.8

Description

Templates with in-buffer field editing for GNU Emacs

Added to portage

2025-11-17

vertico - 2.6
Ebuild name:

app-emacs/vertico-2.6

Description

Vertical interactive completion

Added to portage

2025-11-17

xelb - 0.22
Ebuild name:

app-emacs/xelb-0.22

Description

X protocol Emacs Lisp Binding

Added to portage

2025-11-17

xfce4-panel - 4.21.1
Ebuild name:

xfce-base/xfce4-panel-4.21.1

Description

Panel for the Xfce desktop environment

Added to portage

2025-11-17

2025-11-16
86Box - 5.2-r1
Ebuild name:

app-emulation/86Box-5.2-r1

Description

Emulator of x86-based machines based on PCem

Added to portage

2025-11-16

ansible-pylibssh - 1.3.0
Ebuild name:

dev-python/ansible-pylibssh-1.3.0

Description

Python bindings for libssh client specific to Ansible use case

Added to portage

2025-11-16

aotriton-bin - 0.11b-r1
Ebuild name:

sci-libs/aotriton-bin-0.11b-r1

Description

Ahead of Time (AOT) Triton Math Library (binary package)

Added to portage

2025-11-16

curl - 8.17.0-r1
Ebuild name:

net-misc/curl-8.17.0-r1

Description

A Client that groks URLs

Added to portage

2025-11-16

elasticsearch - 8.19.2
Ebuild name:

dev-ruby/elasticsearch-8.19.2

Description

Ruby integrations for ES, elasticsearch module

Added to portage

2025-11-16

elasticsearch - 9.2.0
Ebuild name:

dev-ruby/elasticsearch-9.2.0

Description

Ruby integrations for ES, elasticsearch module

Added to portage

2025-11-16

elasticsearch-api - 8.19.2
Ebuild name:

dev-ruby/elasticsearch-api-8.19.2

Description

Ruby integrations for ES, elasticsearch-api module

Added to portage

2025-11-16

elasticsearch-api - 9.2.0
Ebuild name:

dev-ruby/elasticsearch-api-9.2.0

Description

Ruby integrations for ES, elasticsearch-api module

Added to portage

2025-11-16

erb - 6.0.0
Ebuild name:

dev-ruby/erb-6.0.0

Description

An easy to use but powerful templating system for Ruby

Added to portage

2025-11-16

fake-py - 0.11.10
Ebuild name:

dev-python/fake-py-0.11.10

Description

Minimalistic, standalone alternative fake data generator with no depende

Added to portage

2025-11-16

filezilla - 3.69.5
Ebuild name:

net-ftp/filezilla-3.69.5

Description

FTP client with lots of useful features and an intuitive interface

Added to portage

2025-11-16

fish - 4.2.1
Ebuild name:

app-shells/fish-4.2.1

Description

Friendly Interactive SHell

Added to portage

2025-11-16

fzf - 0.67.0
Ebuild name:

app-shells/fzf-0.67.0

Description

General-purpose command-line fuzzy finder, written in Golang

Added to portage

2025-11-16

gcc - 15.2.1_p20251115
Ebuild name:

sys-devel/gcc-15.2.1_p20251115

Description

The GNU Compiler Collection

Added to portage

2025-11-16

goland - 2025.2.4
Ebuild name:

dev-util/goland-2025.2.4

Description

Golang IDE by JetBrains

Added to portage

2025-11-16

hipBLASLt - 7.1.0-r2
Ebuild name:

sci-libs/hipBLASLt-7.1.0-r2

Description

General matrix-matrix operations library for AMD Instinct accelerators

Added to portage

2025-11-16

hypothesis - 6.148.0
Ebuild name:

dev-python/hypothesis-6.148.0

Description

A library for property based testing

Added to portage

2025-11-16

mocha - 2.8.2
Ebuild name:

dev-ruby/mocha-2.8.2

Description

Mocking and stubbing using a syntax like that of JMock and SchMock

Added to portage

2025-11-16

pg_background - 1.5
Ebuild name:

dev-db/pg_background-1.5

Description

Postgres Background Worker

Added to portage

2025-11-16

popwin - 1.0.0
Ebuild name:

app-emacs/popwin-1.0.0

Description

Popup window manager for Emacs

Added to portage

2025-11-16

pycharm-community - 2025.2.4
Ebuild name:

dev-util/pycharm-community-2025.2.4

Description

Intelligent Python IDE with unique code assistance and analysis

Added to portage

2025-11-16

pycharm-professional - 2025.2.4
Ebuild name:

dev-util/pycharm-professional-2025.2.4

Description

Intelligent Python IDE with unique code assistance and analy

Added to portage

2025-11-16

pytest-localftpserver - 1.4.0
Ebuild name:

dev-python/pytest-localftpserver-1.4.0

Description

A PyTest plugin which provides an FTP fixture for your tests

Added to portage

2025-11-16

rmg - 0.8.7
Ebuild name:

games-emulation/rmg-0.8.7

Description

Rosalie's Mupen GUI

Added to portage

2025-11-16

rocm_bandwidth_test - 7.1.0-r1
Ebuild name:

dev-util/rocm_bandwidth_test-7.1.0-r1

Description

Bandwidth test for ROCm

Added to portage

2025-11-16

signal-desktop-bin - 7.79.0
Ebuild name:

net-im/signal-desktop-bin-7.79.0

Description

Allows you to send and receive messages of Signal Messenger on you

Added to portage

2025-11-16

sshfs - 3.7.5
Ebuild name:

net-fs/sshfs-3.7.5

Description

Fuse-filesystem utilizing the sftp service

Added to portage

2025-11-16

starship - 1.24.1
Ebuild name:

app-shells/starship-1.24.1

Description

The minimal, blazing-fast, and infinitely customizable prompt for any sh

Added to portage

2025-11-16

syd - 3.45.0
Ebuild name:

sys-apps/syd-3.45.0

Description

seccomp and landlock based application sandbox with support for namespaces

Added to portage

2025-11-16

syd-tui - 0.2.2
Ebuild name:

sys-apps/syd-tui-0.2.2

Description

Syd's Terminal User Interface

Added to portage

2025-11-16

systemtap - 5.4
Ebuild name:

dev-debug/systemtap-5.4

Description

Linux trace/probe tool

Added to portage

2025-11-16

tavern - 3.0.1
Ebuild name:

dev-python/tavern-3.0.1

Description

A tool, library, and Pytest plugin for testing RESTful APIs

Added to portage

2025-11-16

types-psutil - 7.0.0.20251116
Ebuild name:

dev-python/types-psutil-7.0.0.20251116

Description

Typing stubs for psutil

Added to portage

2025-11-16

vivaldi - 7.7.3851.48
Ebuild name:

www-client/vivaldi-7.7.3851.48

Description

A browser for our friends

Added to portage

2025-11-16

vivaldi-snapshot - 7.7.3851.44
Ebuild name:

www-client/vivaldi-snapshot-7.7.3851.44

Description

A browser for our friends

Added to portage

2025-11-16

xmlstarlet - 1.6.1-r5
Ebuild name:

app-text/xmlstarlet-1.6.1-r5

Description

A set of tools to transform, query, validate, and edit XML documents

Added to portage

2025-11-16

zope-interface - 8.1.1
Ebuild name:

dev-python/zope-interface-8.1.1

Description

Interfaces for Python

Added to portage

2025-11-16

rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2020 Sascha Nitsch Unternehmensberatung GmbH
Valid XHTML1.1 : Valid CSS : buttonmaker
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 55.8 ms