October 2015
Intermediate to advanced
356 pages
7h 54m
English
| Tip 70 | Act Upon a Collection of Files |
So far, we’ve stuck to tasks that were repeated in the same file, but we can play back a macro across a collection of files. Once again, we’ll consider how to execute the macro in parallel and in series.
Let’s start with a set of files that look something like this:
| | # ...[end of copyright notice] |
| | class Animal |
| | # implementation |
| | end |
We’ll wrap the class in a module to end up with this:
| | # ...[end of copyright notice] |
| | module Rank |
| | class Animal |
| | # implementation... |
| | end |
| | end |
Source these lines of configuration to reproduce the examples in this tip:
| | set nocompatible |
| | filetype plugin indent on |
| | set hidden |
| | if has( ... |