Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!gatech!hao!husc6!cmcl2!brl-adm!adm!groff%community-chest.mitre.org@gateway.mitre.ORG From: groff%community-chest.mitre.org@gateway.mitre.ORG Newsgroups: comp.unix.wizards Subject: help w/ a vi map Message-ID: <7881@brl-adm.ARPA> Date: Tue, 16-Jun-87 17:26:19 EDT Article-I.D.: brl-adm.7881 Posted: Tue Jun 16 17:26:19 1987 Date-Received: Sun, 21-Jun-87 07:54:43 EDT Sender: news@brl-adm.ARPA Lines: 27 I have encountered a puzzling problem w/ setting up a map in vi. It began w/ a file I had redirected from 'man printcap'. This file had _^H's thru-out. I could have simply done :1,$s/_^H//g and gone merrily on my way. (This worked fine.) I decided to create a map for this function by doing :map ^R :1,$s/_^H//g^M - this worked SORT OF, but NOT as I would have expected. (Control characters and carriage return are escaped w/ ^V.) The puzzling sequence follows: (starting w/ file full of _^H's) 1) Issue the command longhand (works) 2) Undo the command ('u') 3) Issue the map command - ^R (works) 4) Undo the command, and quit the file (no changes) 5) BTW the map setup is in my EXINIT variable 6) 'vi' the file again and immediately issue the map command. 7) Get the error: "No previous regular expression" Would really appreciate enlightenment from anyone who understands what is happening. - Paul Groff groff@mitre.arpa The MITRE Corporation 7525 Colshire Dr. McLean, VA 22102 (703) 883-5810