Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!uunet!mcvax!unido!cadlab!berni From: berni@cadlab.UUCP (Bernhard Kraft) Newsgroups: comp.unix.questions Subject: Re: vi case-change summary (a bit long) Summary: How can I fill text in named buffers by EXINIT or .exrc Keywords: vi keymaps Message-ID: <493@cadlab.cadlab.de> Date: 12 Jul 89 16:06:44 GMT References: <1061@gtx.com> Reply-To: berni@cadlab.UUCP (Bernhard Kraft) Distribution: comp.unix.questions Organization: Cadlab Paderborn, Germany Lines: 33 In article <1061@gtx.com> rich@gtx.com (Rich Holloway) writes: > This will convert the current word to lower case (caveats below): > > map ~!w "cdei:s/\(^V^[pa\)/\L\1/^V^[F:Pl"cd3f/@c^V^M > This vi-keymap/macro works well, but I don't understand why? I have tried to put any piece of text into a name buffer, before vi started (by $EXINIT or .exrc), but it never really works. For example: map g OInsertedText^["gdd This was an attempt to put a text into the buffer g , when I type g. But when I typed g the text is inserted and deleted. In the buffer g was nothing, when I typed "gP, but it was filled with the InsertedText, when I typed the ex-command :pu g. After I have typed the ex-command a "gP printed out the InsertedText, as expected. Other attempts to fill text into a line by ex-command in EXINIT or .exrc caused a bus error. For example the lines I InsertedText . d g in .exrc. Can anyone explain this?