|
|
1.1 root 1: Here are some vi macros, you can use these to encrypt, sign, decrypt or
2: view PGP messages from vi. They are all invoked by typing Ctrl-X followed
3: by one of the letters e,s,d or v. The encrypt/sign macros work from
4: the current cursor position to the end of the file, for the decrypt/sign
5: macros you should position the cursor before the PGP armored block you
6: want to decrypt/view.
7:
8: If the PGP command fails, for instance because you typed the wrong userid
9: for encryption, you should type u when you're back in vi to undo the change.
10:
11: These macros should be added to your .exrc file. If you don't have a .exrc
12: file, you can create one by typing:
13:
14: echo $EXINIT >$HOME/.exrc
15:
16: You should also make sure that the EXINIT environment variable isn't set
17: in your shell startup file (.profile .login .cshrc etc.).
18:
19: -----cut here-----
20: map e :,$! /bin/sh -c 'pgp -feast 2>/dev/tty||sleep 4'
21: map s :,$! /bin/sh -c 'pgp -fast +clear 2>/dev/tty'
22: map d :/^-----BEG/,/^-----END/! /bin/sh -c 'pgp -f 2>/dev/tty||sleep 4'
23: map v :,/^-----END/w !pgp -m
24: -----cut here-----
25:
26: The macros can be used with [t]csh and Bourne-type shells, the latter don't
27: need the /bin/sh -c '..' wrapper.
28:
29: Here is another macro, only useful if you use MH. You can use it to
30: include an encrypted message you are replying to.
31:
32: -----cut here-----
33: map i :r! /bin/sh -c 'pgp -f <@ 2>/dev/tty|sed -e "s/^/>/"'
34: -----cut here-----
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.