Path: utzoo!mnetor!uunet!husc6!bbn!rochester!srs!matt From: matt@srs.UUCP (Matt Goheen) Newsgroups: comp.unix.wizards Subject: How can you put a `|' in a vi map? Message-ID: <521@srs.UUCP> Date: 5 Jan 88 18:50:30 GMT Distribution: na Organization: S.R. Systems, Rochester NY Lines: 22 Try as I may, I can't seem to find a way to put a pipe symbol (`|') into a vi (ex) map. For example, in vi try: :map q i|^[ Where '^[' is entered via ^V then the escape key. Vi says something like "Unknown command character '^['". You can try escaping the `|' with a backslash and get different but equally useless results. Seems that I've tried everything (doubling the `|', backslash, etc.). The problem is that vi thinks the `|' is a command separator no matter what you do. I'm trying to write a map that sends a block of text to a series of pipelined commands (e.g. 'sed "s/^.\* //" | fmt | sed "s/^/\*\* /"' in a map along with a few other vi commands to fix it up). I have solved the problem using a shell script (or mapping three separate shell escapes into the map command -- ugghh). It just seems that there MUST be a way to do this the "right" way... -- -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- - UUCP: {allegra,rutgers,ames}!rochester!srs!matt Matt Goheen - - "Make you love to hate, and hate to love..." S.R. Systems - -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-