On 28/03/10 23:32, Jean Johner wrote:
On Mar 28, 2:30 pm, Christian Brabandt<[email protected]>  wrote:

The solution is to use<c-\><c-o>  before issuing the command (see :h
i_CTRL-\_CTRL-O). I am not sure, why amenu uses<C-\><C-O>  instead of
<C-O>, but I suspect, there is a reason for that. In case it is not, I
quickly hacked together this patch (attached), which seems to work.

Hi Christian,
1) In unix
- With vimrc_example.vim as .vimrc, quitting with<C-\><C-O>:q does
not solve the problem.
- With vimrc_example.vim completed with Andy's code, quitting with<C-
\><C-O>:q does solve the problem

2) In Windows
Typing CTRL-\ writes an \ so it does not work.

This just means that to get the Ctrl-\ character (0x1C) on Windows, you have to do something else than hit \ while holding Ctrl. Try the following:

        :map  <F12>  <C-\>
        :map! <F12>  <C-\>

then hit F12 whenever you need a Ctrl-\ (in any mode). Using map rather than noremap means that any mapping which includes <C-\> in its {lhs} will still be applied.

Of course you can use any other convenient {lhs} instead of <F12> if you prefer; and if you like uniformity you can define (and use) these mappings even on systems where "hitting \ while holding Ctrl" does work.

Another possibility would be to find which key combo (if any) produces the byte 0x1C on your Windows keyboard. On my (Belgian) AZERTY keyboard, and on Linux, I get it by holding both Ctrl and AltGr down while hitting the key at bottom left, between Shift and W. Not exactly the easiest thing to do.


For unix, I guess your patch +Andy's code+using<C-\><C-O>:q to quit
would completely solve the problem. I have not tried yet.

Best regards
Jean Johner


Best regards,
Tony.
--
Fortune's graffito of the week (or maybe even month):

                Don't Write On Walls!

                   (and underneath)

                You want I should type?

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

To unsubscribe from this group, send email to vim_dev+unsubscribegooglegroups.com or 
reply to this email with the words "REMOVE ME" as the subject.

Raspunde prin e-mail lui