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:

88688

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

8. Macros


Buffers can also act as macros if they contain valid vi or ex commands.
To execute such a macro, type:



@a - where "a" is the name of the buffer

Example: From a file containing definitions of complex macros, yank
one paragraph (say, 20 lines) to a named buffer "a". Then
return to a file you were originally editing and type @a.
The commands contained in the buffer will be executed on the file
being edited.


It is possible to make files act as vi macros by using command:


:so filename

The most powerful macros, however, are created using programs combined
into shell scripts (or DOS batch files), and acting as filters on the text
sent to them from within vi. Such shell scripts or programs must take standard
input and send results to standard output (which most UNIX tools do).


Even though seemingly strange at first, with a little practice using
vi becomes second nature.



/* 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.3 (47 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-26
2026-09-25
awscli - 2.37.2
Ebuild name:

app-admin/awscli-2.37.2

Description

Universal Command Line Environment for AWS

Added to portage

2026-09-25

containerd - 2.4.1
Ebuild name:

app-containers/containerd-2.4.1

Description

A daemon to control runC

Added to portage

2026-09-25

graphviz-dot-mode - 0.4_p20181118
Ebuild name:

app-emacs/graphviz-dot-mode-0.4_p20181118

Description

Emacs mode for editing and previewing Graphviz dot graphs

Added to portage

2026-09-25

groovy-emacs-modes - 2.1
Ebuild name:

app-emacs/groovy-emacs-modes-2.1

Description

Groovy major mode, grails minor mode, and a groovy inferior mode

Added to portage

2026-09-25

gruvbox-theme - 1.30.2
Ebuild name:

app-emacs/gruvbox-theme-1.30.2

Description

Gruvbox is a retro groove color scheme, now in Emacs

Added to portage

2026-09-25

gruvbox-theme - 1.30.3
Ebuild name:

app-emacs/gruvbox-theme-1.30.3

Description

Gruvbox is a retro groove color scheme, now in Emacs

Added to portage

2026-09-25

gruvbox-theme - 9999
Ebuild name:

app-emacs/gruvbox-theme-9999

Description

Gruvbox is a retro groove color scheme, now in Emacs

Added to portage

2026-09-25

h4x0r - 0.13-r1
Ebuild name:

app-emacs/h4x0r-0.13-r1

Description

Aid in writing like a script kiddie does

Added to portage

2026-09-25

haskell-mode - 17.4
Ebuild name:

app-emacs/haskell-mode-17.4

Description

Mode for editing (and running) Haskell programs in Emacs

Added to portage

2026-09-25

linode-cli - 5.69.0
Ebuild name:

app-admin/linode-cli-5.69.0

Description

Official command-line interface for interacting with the Linode API

Added to portage

2026-09-25

magit - 4.7.1
Ebuild name:

app-emacs/magit-4.7.1

Description

A Git porcelain inside Emacs

Added to portage

2026-09-25

package-build - 5.0.3
Ebuild name:

app-emacs/package-build-5.0.3

Description

Tools for assembling a package archive

Added to portage

2026-09-25

untangle-https-backup - 0.2.0
Ebuild name:

app-backup/untangle-https-backup-0.2.0

Description

Back up Untangle configurations via the web admin UI

Added to portage

2026-09-25

vertico - 2.15
Ebuild name:

app-emacs/vertico-2.15

Description

Vertical interactive completion

Added to portage

2026-09-25

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