Wednesday, April 3, 2013

Re: Is there already a solution for mapping in Terminal (urxvt)?

On 03/04/13 09:49, LCD 47 wrote:
> On 2 April 2013, Kent <kent.yuan@gmail.com> wrote:
> [...]
>> What I want to map is simple, <a-j/k> move current line up/down.
> [...]
>
> The keyboard bindings for <ALT> in urxvt depend on the URxvt.meta8
> resource. If URxvt.meta8 is false (which is the default), <ALT><key>
> sends <ESC><key> and thus you need to write your maps for <ESC>mumble:
>
> nnoremap <Esc>j "zdd"zp
> nnoremap <Esc>k k"zdd"zpk
>
> If URxvt.meta8 is true, <ALT><key> sends an 8-bit character and sens
> the Meta flag, which means you have to write your maps for <M-mumble>:
>
> nnoremap <M-j> "zdd"zp
> nnoremap <M-k> k"zdd"zpk
>
> In order to change the URxvt.meta8 resource, either add
>
> *URxvt.meta8: true
>
> to /etc/X11/app-defaults/URxvt (the path may differ on your machine), or
> add
>
> URxvt.meta8: true
>
> to ~/.Xresources (and run "xrdb -merge ~/.Xresources" for it to take
> effect immediatley).
>
> The xterm equivalent of URxvt.meta8 is VT100.metaSendsEscape.

…or to be precise, !(vt100.metaSendsEscape) of course (the one is true
when the other is false, to give the same meaning).

>
> /lcd
>

Best regards,
Tony.
--
New Hampshire law forbids you to tap your feet, nod your head, or in
any way keep time to the music in a tavern, restaurant, or cafe.

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: