Wednesday, October 19, 2011

Re: trying to understand my own (very old) vim macros

On 19/10/11 21:25, oexel wrote:
> hello list!
>
> I'm trying to understand the vim macros I wrote with the valuable help
> from YOU (perhaps your parents :-) some 10 years ago.
>
> there are a lot of mappings where the rhs is backslash-tilde-letter,
> for example:
>
> map \~O :let @z='q.pck'<c-M>\~W
>
> and those mappings are then used by other mappings (just as this map
> uses \~W);
>
> what does the \~ combination mean?
> is it possible to activate such mappings from the keyboard? which keys
> should I type?
>
> TIA!
>

If ~W represents a single key (you cannot choose to put the cursor on
one or the other, it is always on the same one of both) then it means
Alt-uppercase-W (Alt-Shift-w) (assuming that your 'cpoptions' does not
contain the B flag) and it's recommended to replace it by <A-W> or <M-W>
in the mapping (if your 'cpoptions' does not include the < flag).

In gvim with GTK2/Gnome2 GUI, hitting Alt-Shift-w gives me no result
(gvim doesn't see the keystroke, not even when preceded by Ctrl-V).

Beware that Alt-Shift-W means 0xD7 which in Latin1 is the "multiply by"
sign (looks like a kind of x a pixel or two above the baseline). Vim
makes no difference between the two so you cannot map в and Alt-Shift-w
to do different things.

If you can put the cursor on either the tilde or the W then AFAIK \~W is
just a backslash then a tilde then a W (but you probably should have B
in 'cpoptions' in that case). The backslash might also mean either of
the <Leader>or the <LocalLeader> prefixes (q.v.)


Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
202. You're amazed to find out Spam is a food.

--
You received this message from the "vim_use" 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

No comments: