On 07/04/09 07:04, fREW Schmidt wrote:
>
>
> On Sun, Apr 5, 2009 at 11:01 PM, Ken Bloom <[email protected]
> <mailto:[email protected]>> wrote:
>
>
>     On Sun, 05 Apr 2009 22:32:56 -0500, fREW Schmidt wrote:
>
>      > On Sun, Apr 5, 2009 at 4:08 AM, Tony Mechelynck <
>      > [email protected]
>     <mailto:[email protected]>> wrote:
>      >
>      >
>      >> On 05/04/09 03:51, Ken Bloom wrote:
>      >> > On Fri, 03 Apr 2009 16:04:36 -0500, fREW Schmidt wrote:
>      >> [...]
>      >> >> Maybe this will give some insight: doing @; gives errors about an
>      >> >> invalid register ';' but doing @: is (apparently) a no-op.
>      >> >
>      >> > Sounds like a bug. : should be a register too. If it
>     interprets @; as
>      >> > the ; register, then it should interpret @: as the : register.
>      >> >
>      >> > --Ken
>      >> >
>      >> >
>      >> Under ":help quote:" it is expicitly said that @: should repeat the
>      >> latest ex-command.
>      >>
>      >> You can also use any of
>      >> ":p
>      >> ":P
>      >>        :put:
>      >>        :reg:
>      >>
>      >> to see what is there. Of course, if it were empty it would be a
>     no-op.
>      >> But here, even after using : as the ex-command the register doesn't
>      >> become empty, and since it's a read-only register you couldn't do
>      >>        :let @: = ""
>      >
>      >
>      > That's still a bug though, right?  @: doesn't execute the latest
>      > ex-command.  And @; should map to @: but doesn't...
>
>     One of the two following cases should be true:
>     Case 1: @: maps to @;
>             @; maps to @:
>     Case 2: @: maps to @:
>             @; maps to @;
>     Case 2 really should be the case. (You're suggesting that case 1 should
>     be the case, and I disagree with that.)
>
>     In my testing, it appears that @; is complaining about the invalid ;
>     register (like Case 2) and when I type @:, it beeps at me rather than
>     executing the command. If I type ":p, it pastes the last command just
>     fine (without a leading : or ;). So something's special-casing the @:
>     code, and the mappings are messing it up. That's what sounds like a bug.
>
>
> Well, does anyone have any ideas for a workaround?  I was thinking an
> autocommand that would copy ';' + @: + '<cr>'  to @z or something.  Then
> I could still use it, just with a different register.

Hm, what happens if you use one of the following {rhs}es in a 
Normal-mode mapping? Then you wouldn't need to copy the ex-command 
register contents except when you really need it.

        :exe @:<CR>
or
        :let @@ = @: <Bar> exe @@<CR>
or
        :let @@ = @: <Bar> normal @"<CR>

Notes:
1. I'm clobbering the unnamed register as the one least likely to hold 
"valuable permanent data".
2. The above is for use in a mapping. To try it directly at the 
command-line, use | instead of <Bar> and hit the Enter key (to execute 
the ex-command) instead of <CR>.


Best regards,
Tony.
-- 
BLACK KNIGHT: I'm invincible!
ARTHUR:       You're a looney.
                  "Monty Python and the Holy Grail" PYTHON (MONTY) 
PICTURES LTD

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to