mapping space in rhs of another map (vanilla vi)

mapping space in rhs of another map (vanilla vi)

Post by Dorai Sitar » Fri, 24 Mar 2000 04:00:00

I'm defining a map <c-w>r in vanilla vi
that will map <space> to <c-f> and b to
<c-b>.  (The <...>'s are just for readability.) I.e.,
I'm looking for something like

map <c-w>r :map <space> <c-f><cr>:map b <c-b><cr>

I am diligently preceding each of those special chars
with a <c-v> (the space gets two <c-v>s),
but it won't get off the ground.  I'd be grateful for
any suggestions.


ps: This is for an offsite machine that I can't install
a better vi clone on.


1. Mapping a map in VI

Hello & thanks for your reply.

My vi version does not support modelines directive.
I wish to create a macro in my exrc file that will
yank the first line of the workfile into a named buffer
and then execute this line.

Thus, the first line of particular files that I wish edited
will contain likely some commands or a so(urce) sourcefile
command that will be executed just by editing the file.

My problem is to get exrc file pointed to by EXINIT environment
variable to yank the first text line of the edited file into
the named macro and then execute it.

Any ideas?

I am using the MS-DOS vi made by Mortice Kern Systems, which
is pretty compliant with it's UNIX big brother.

Thanks for Emailing your reply back or posting it here.

2. Installing Software

3. map in .exrc versus via :map in vi itself

4. How to get Sambagoing as installed from Solaris 8 companion CD.

5. Minimum system for Think C

6. VI: How to map tab to four spaces?

7. Delta Ford & 64MB PCs

8. How to map TAB to SPACE in vi

9. mapping <space> key in vi

10. Help : Need to map TAB to # of spaces in VI

11. mapping TAB to spaces in Vi

12. Help request: Serial ports in VME space mapped to PCI space.